Lecturer: In the second part of the lecture,
I'll demonstrate some of the typical types
of calculations we can make using network analysis.
Before we get into that, however, I'd like
to take a closer look at network data sets.
In particular, we'll look at the dataset properties
to understand its definition
and how we can extract important information
for interpreting the outputs
of our network analysis calculations.
Then we'll look at four examples, a route calculation,
a closest facility calculation, a service area definition,
and an origin destination cost matrix.
Let's switch over to our ArcGIS and take a look.
Here we are in my project
and if I look in my Project Geo database,
I see I've got a road network dataset.
It appears that it's a feature dataset.
Let's take a look inside
and we see that feature dataset has three components.
The actual road network itself,
and if you notice
that icon looks just a little bit different
with that red line that appears to go across a graph.
Also included are the network junctions
a point feature class and streets a line feature class.
I've already added the data to the project,
but remember if you wanna add all of the contents
of a feature dataset to a project at one time,
you can right click the feature dataset name
and choose Add To Current Map.
If we look at the properties of those individual components
of the dataset, the first two are junctions
and our streets
look familiar to what we've seen before
when we've investigated layer properties.
However, if we look at our road network itself
and check those properties out, we see something
that looks a little bit different.
Let's focus in on this summary area
and if I expand that, I see the summary details
of the creation of the network dataset.
I can see that there are almost 24,000 edges
and 10,600 junctions.
I didn't specify any turn rules in this,
so none are indicated here.
If I scroll down a bit further,
I notice the cost attributes.
In this case, we've defined cost using minutes
and using distance
and that distance specifically is measured in meters.
We could look more closely at our restrictions
to see what happens
when the network encounters one-way streets
or junctions with specific turn requirements.
The last thing I'll point out is the road class descriptor.
In this case, there's an attribute within my streets dataset
that specifies the road class.
Is it a highway, a ferry, a roundabout,
or maybe just a local road?
Each one of those is considered
and then classified according to that attribute value.
If I look over at my Chittenden street's dataset,
I notice interstates, highways
and others where others seems to represent local streets.
That sort of network data sets in a nutshell,
certainly a lot more to understand if you were trying
to build one of those network data sets yourself.
It's up to you what to display.
I tend to turn the junctions off
and leave my streets on
so I can see the different street types
that are being used in the analysis.
Okay, let's take a look at some network analysis examples.
This first example, we'll look at a simple route calculation
to calculate a route using network analysis
in ArcGIS select the Analysis ribbon
and then choose the Network Analysis dropdown.
Before you make any calculations however,
be sure that you specified
the appropriate network data source.
Again, you wanna use something local.
We don't have the credits to support
the cloud computing version of network analysis.
Once you've ensured
that you're using a local network data set from there,
choose route to find the shortest path between stops.
ArcGIS will make a route analysis layer
that feature data set that includes all the inputs
and outputs from a route analysis
we see that's been created over here
in our contents pane on the left.
We also notice that with the route selected,
I have a route option on the ribbon across the top
of the software interface.
One other thing to note, this says route two.
That's because I already computed a route
within this project.
ArcGIS will just sequentially number these data sets
as you create additional ones.
Okay, next step, let's import our stops.
In this case, I've already created two points
that I wanna navigate
between indicated with the backpacker icon.
If I click import stops ArcGIS automatically knows
that I'm using Route two for my network analysis layer
that the sublayer I'm gonna populate here is called Stops
and again, we see that as the first entry in my route
to feature dataset
and I just need to specify my locations
in this case the shortest path.
If I click run here, no, the only thing I'm doing
is adding my stops to my stops feature class.
Now we see values of one
and two symbolized by those green points,
so that's it and its most basic form,
I can click Run to generate that route.
Real quickly before I do, I'll open the attribute table
for the routes feature class.
Notice that there's nothing contained
within that attribute table just yet.
If I come back to my network Analyst ribbon
and click Run, we'll notice
that my features are all locked down
while ArcGIS makes that calculation
and once done, we see the route highlighted here in green
and we see the record populated in my routes table.
If I scroll to the right a bit,
I can see that my first stop was number one,
my last stop was number two.
The total distance in meters was almost 5,200
and my total cost was about 4.68.
Remember that total distance is being measured in meters
and the total cost is being measured in minutes.
We saw that information
when we looked at the network dataset definition.
One more thing to note here,
I can click the Show Directions button
to list the directions that define that route.
I could print them for here
or use the directions geo processing tool to export them
to a text HTML or XML format.
Let's look at one more route example here.
In this case, suppose you want to travel
among more than two point locations
and so have I highlighted a bunch of restaurant locations
in and around the Burlington area.
I've already created my route analysis layer
and imported those restaurant locations as stops.
If I look at the attribute table for that stops data set,
I see that I've got 13 locations that each one
of those locations has been assigned a name
that comes from the original object ID
and also a sequence number.
Let's look at the route tab
and our interface to see what that sequence is all about.
We see here a sequence parameter
and this specifies to use the current, so if I click run
and solve for this, using that current sequence,
ArcGIS will generate the best route.
Again, this means I'm going from one to two to three to four
and so on based on that location
and sequence number that we see here.
Now if I change that sequence from use current
to one of the others, we'll get a different output.
Before we do that,
let's just consult the routes table real quickly
to see that we've got a single route.
First stop is one, the last stop is 13.
There's 13 total stops with a total travel cost
of just over 27 minutes.
Okay, let's change from use current to find best.
Click Run once again to solve
and we'll see what the difference is.
ArcGIS is computed a new route
and if we look at the routes attribute table,
we see that the new route only costs about 16 minutes
of time instead of the 27 minutes we saw before.
In this next example,
we'll look at the closest facility analysis.
There's been an accident on the highway
and we wanna figure out which fire station should respond.
Notice that for the closest facility analysis,
it requires two inputs, facilities and incidents.
Okay, let's import our incidents first.
That's gonna be the traffic accident
that we see with the icon in the middle of the screen.
I'll add that and I'll import my facilities.
Those are the fire stations
that will be responding to the accident.
Once that tool is completed,
I can hover over my ad locations
and the history pane, scroll down to the messages section
and I can see that 31 features out
of the 31 in my fire station's dataset
were added as facilities.
If I solve for that particular configuration
and then open the routes attribute table,
I see a total travel cost of just over two minutes
between the facility and the incident.
One more thing to note however,
is that my directions parameter seems
to be pointing towards the facility
when what we actually want
is to travel from the fire station to the accident.
Let's change that, set that to away from facilities
and rerun our analysis.
Well, sure enough, we see a different result.
In this case, if you wanna travel from a fire station
to the accident,
the closest fire station is about 3.6 minutes away.
Again, this direction parameter influences the direction
of travel for route planning purposes.
It does not affect which direction you're allowed
to travel on the streets.
Let's look at another example.
In this case, instead of just a single facility responding
to an incident, let's change that to five facilities,
perhaps it's a really bad accident
and you need multiple fire stations to make an appearance?
We'll click Run once again to solve for the parameters
and investigate the output.
If I look at my route's attribute table this time,
not surprisingly,
I see that there are five records in the table.
One for each route between the fire station
and the traffic accident.
Scroll to the right
and I can look at my travel cost information.
Not surprisingly, the fastest fire station
to reach is still at 3.6 minutes.
If I saw in descending order,
I can see that the furthest away fire station
of the five takes almost six minutes to get there.
Now let's take a look at one last example.
Remember I said there were 31 fire stations
that were included in my facilities dataset,
so let's have ArcGIS look at all 31 facilities,
but this time, let's see
how many can make it to the incident within 10 minutes.
Click Run.
Once again to analyze under this current configuration
in ArcGIS finds that there are 10 fire stations
within that 10 minute cutoff time,
so 10 of the 31 fire stations can make it within 10 minutes.
The slowest of those takes about 9.7 minutes.
Okay, that's it for closest facilities for now,
let's switch gears and take a look at service areas.
We'll continue to stick with our fire stations
as our facilities dataset.
I've already set up my service area analysis layer
and imported my facilities.
The 31 fire stations we used in the last example.
A couple of things to note here.
Again, we have control over the direction
and this time once again, we want to compute that direction
as being away from the facilities.
One other thing we can look at are the cutoffs,
and this is the cutoff value in the units
of the travel mode.
In this case, we're talking about minutes,
so let's compute three minute, five minute,
and 10 minute cutoff times away from each of our facilities.
One other thing to note is the output geometry.
You have a choice among polygons, lines
or polygons and lines.
I tend to choose just polygons.
You can also specify whether you want your polygons
to overlap, dissolve, or be split.
Once again, I like the default setting of overlap
and I keep the rings as well so that each one
of those polygons represents that time interval
for the travel cutoff.
Okay, let's solve and see what we get.
In terms of output,
we get the polygon definitions for those cutoff times.
Note three, five,
and 10 match the cutoffs we designate up at the top.
If we look at the attribute table,
we see 93 different polygons,
which makes sense based on our settings.
Three polygons for each of the 31 fire stations.
You can see in the the attribute table,
the from and two break for each one of those fire stations,
so with ID of 170, the zero to three minute polygon,
the three to five minute polygon,
and the five to 10 minute polygon.
The other thing we can note is gaps in coverage.
Everywhere that's not covered by one of these polygon
boundaries that we see in our table of contents means
that no fire station can reach
that location within 10 minutes.
The last of these examples we'll look at
is calculating an origin destination cost matrix.
In this example, I wanna try something a little different.
I've already created my origin destination cost matrix
analysis layer, but instead of importing existing data
for my origins and destinations,
I'm gonna create them on the fly.
Suppose you go out to eat every Thursday night
with three other friends,
you all live in different locations.
Let's create origin points for each one
of the four houses, yours plus your three friends,
so I'll just assign those
to four different network locations.
Click OK.
Note that I've actually modified a data layer,
so I need to save my edits.
Click Yes to save those.
Let's do the same thing for our destinations.
Suppose you've got five different restaurants
that you really like and those are the ones
that you always choose for those weekly outings.
Once again, I'll choose to create them
and this time I'll choose from the destinations template
and I'll just add five destinations
in this little area of downtown Burlington.
Okay, save those changes and we should be ready to go.
We see some of the same functionality
as before in terms of our ability to specify a cutoff
or the number of destinations.
One other thing to point out here is your choice
between no lines and straight lines.
No lines will not render the graph
and straight lines will render the graph
that you might expect as part of your output.
Let's keep the straight lines in
and solve for the parameters we have.
Remember, there's four origin locations, one for each of you
and your friends' houses and five restaurants.
That means we should see 20 records in our output table,
and if I open that lines attribute table,
I do indeed see 20 records included in the table.
There are four different origin IDs
and each one of those origins goes to all five
of the different restaurants.
Using the attribute table,
I could locate the closest restaurant to each one
of our friends' houses.
Be careful using the origin destination cost matrix,
especially with big data sets.
This is very computationally intensive and could take hours
or days to run if you're not careful.
Well, that's it for now with network analysis and ArcGIS.
I think it's time to let you take the reins.
Just remember, it's not safe to geo process and drive,
so make sure to compute those directions
before you leave the house.