Cost network analysis with slope

8882
8
01-27-2012 06:17 AM
MarkusScharrer
New Contributor
Hi,

I'm trying to make a network analysis containing the time that is needed walking from one point to another. The thing is that i want to include slope, distance and walking speed in this analysis. Distance and walking speed shouldn't be too big of a problem, but I have no idea how to include the slope into the whole cost analysis.
Is there a way to combine the street features of the base map that I'm using with the slope "cost" before the network analysis or is there a way to do this while doing the analysis?

Thanks in advantage,

Markus
Tags (2)
0 Kudos
8 Replies
AlexeyTereshenkov
Regular Contributor III
Hi Markus,

What you need is:

1. To get a Digital Elevation Model (DEM) if you need to get the slope values on your own.
2. Use the Slope tool in the Spatial Analyst extension - go through this tutorial which will give you a good start on calculating the slope - http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Exercise_3_Finding_a_site_for_a_new_sc...
3. Assign the results of your analysis to each street segment (i.e., road link) and then use these values as a cost when running the network analysis.
0 Kudos
MarkusScharrer
New Contributor
Hi Alex,
thanks a lot for your quick answer.
I have a DEM10 and calculated the slope in percent with the slope tool.

My only remaining problem is that i have failed to find a tool to link the values to the road features. The "road link" you suggested doesn't seem to exist.. 😞

Thanks,
Markus
0 Kudos
AlexeyTereshenkov
Regular Contributor III
Markus,

You were quick. I thought you are left with lots of things to do 🙂 Impressed. 🙂

Alright, so next step is to convert your slope output raster you've got to features (for instance, polygons). You will use Spatial Join later on to assign the slope values to the road links based on the overlay rules (i.e., these street segments aka road links will get a slope level 10 since they are geographically located in the polygon with the slope_type field = 10).

The tricky part here (if I remember right) is that this conversion will interpret all those slope values as categories. However, slopes are numbers and naturally are not categories. Thus, you have to reclassify the slopes in the raster you have before performing a conversion. You have got two options (at least what I know), those include:

a) using an arithmetic expression like Int( [slope] / 10 ) * 10 in the Raster Calculator : http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000z7000000.htm

b) running Reclassify GP tool: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000sm000000.htm and http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000sr000000.htm.

All of these should let you reclassify the floating slope values into integer classes (e.g., 1-20 deg slope will be "Class 1").

It's been a long time ago I did those things, so you might need to check with the Geoprocessing forums if you get any questions 🙂

After you've done this, you are ready to run the Raster to Polygon GP tool: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Raster_to_Polygon/001200000008000000/
0 Kudos
MarkusScharrer
New Contributor
hey, thanks again!!
I've managed to figure out a way to combine the slope values with the streets.

So next I've tried to run the network analysis without the slope cost to see if it would work. I'm trying to work out the service areas for different bus stops in several smaller towns/villages. For some reason it seems like the analysis is ignoring several streets in the analysis, thus shaping the polygons completely wrong. I've added a screenshot of the areas in question.

My second question is regarding the slope cost. At what point do I add these costs to the analysis?? When I'm creating the network dataset? Or do i do this once I've created the dataset somehow? Sorry for all these questions, but this is the first time I've worked with network analysis...

Thanks,
Markus[ATTACH=CONFIG]11556[/ATTACH]
0 Kudos
SebastianToscano1
New Contributor

Hi! Could you please describe the process you used to combine the slopes with the streets? I'm working in a similar problem. I have the streets on a shapefile and the DEM of the region I need. I extracted the slope with the Slope tool and now I'd like to add that feature to my streets. Could you give me some advice?

0 Kudos
AlexeyTereshenkov
Regular Contributor III
Hey Markus,

No problem, you are welcome. Let's try to figure out these questions together.

1) Check the Service Area solver description available at http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Service_area_analysis/0047000000480000.... It will give you a good understanding of the analysis options.
To get a bit "nicer" visualization of the service area, I'd suggest to try unchecking the Trip polygons option at the Polygon Generation tab of the Service Area network layer properties.

2) It is importand to understand that when you run your network analysis solver, you are using some type of cost. I.e., every road segment has a cost of its traverse. It could be distance (best route = shortest route), time (best route = fastest route) etc. This cost is referred as impedance in the Help pages quite often.
You define the costs for the network analysis in the network dataset properties either in Catalog window in ArcMap or in ArcCatalog. Here you can find info about designing your network dataset: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_a_network_dataset/00470000000....

After you've decided what type of the cost you want to use, let's say it would time of the traverse. So, you'd calculate the time attribute in your source streets feature class *before* building a network dataset. Then you'd calculate the slope value for each road segment in the attribute table. Then you'd create a new field, let's say TotalCost. There you would calculate: TimeCost * SlopeValue, thus getting combined cost values. When SlopeValue can be 10 from 1 where 1 is the steepest road and 10 is absolutely flat road, you could use this formula. If it is the opposite (from 1 to 10, you'd divide on this value instead).

The most important thing to realize: the less is cost, the "better" a road is for including into a route.

More about costs and other network attributes in network analisys: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Understanding_the_network_attribute/00...

After you are done with this, you have to choose what impedance (aka cost) you use in the network analysis (this is done in the Analysis settings tab of the Service Area network layer properties.
0 Kudos
JaySandhu
Esri Regular Contributor
For some reason it seems like the analysis is ignoring several streets in the analysis, thus shaping the polygons completely wrong. I've added a screenshot of the areas in question.


It is most likely that the streets that are getting ignored do not connect to the other streets. So check if they are in fact connected (use the network identify tool on the NA toolbar (second icon from right). Note that they may be connected but have a restriction or high cost so that they are not reached.

The other reason could be that you set the properties of the service area polygon (on the polygon generation) to exclude some set of line source features. If that is the case, un-check the excluded sources.

Jay Sandhu
0 Kudos
StefanCoe
New Contributor II
Hi,
We are doing something similar using slope as a cost factor in optimal path routing for cycling. Anyyone have a good rule of thumb for modifiying a cost variable (currently edge distance) using an edge based slope attribute? Thanks!

-Stefan
0 Kudos