Best  shortest routes

2573
2
06-04-2012 07:21 AM
Highlighted
New Contributor

t

Tags (2)
Reply
0 Kudos
2 Replies
Highlighted
New Contributor
Look into Least Cost Path.    Remember just because the route is shorter does not make it best,  What about the elevation of the path.  Surely anything over 45 degrees is pretty hard to climb.  What about a lake, how does that figure into the path.  Yes these things can be done in ArcMap, usually they require a friction raster, easy to make but you have to understand what you are doing. 


Here is some work I have done:  It addresses a lot of your concerns.    Its a long copy paste but check it.  Around Q 27 gets into logging trails and classifying those trails by using the shreve ordering system.  Let me know if you want the data, I might be able to get it.

  1
GRG 356T �?? Digital Terrain Modeling

Lab 5 �?? Least Cost Path �?? Part I

Objectives: the purpose of this lab is to show you the basics of  least cost path analysis,
using both cost and path analysis functions. We used least cost path functions in one of
our hydrologic modeling labs. Here, you will use hydrologic functions in the context of
path analysis.

Report: Create your report in a Word processor, insert figures when necessary or when
asked to, and submit through Blackboard on or March 28
th
.
Answer all questions marked with a �??Q .�?�

Reminder: Beginning this lab, cartographic work will count toward your grade.

Background 1: Suppose you are working with biologists that are studying animal
behavior. They want to find the likely path a horse would take to get to a bale of hay.
Your job is to use GIS and least cost path  analysis to advise biologists about the likely
path the animal will take. [Yet another silly topic for a lab but  my purpose is to show that
least cost path has a wide range of app lications, not only transportation analysis].

Instructions:

1.   Create a Lab5 folder in your H drive; open  ArcCatalog and connect to your
folder.
2.   Download the datasets from Blackboard and extract to your folder.
3.   Open ArcMap and add the raster file  nlcd92. Right click on this layer  �?� 
Properties �?�  Symbology �?�  Import, and select  nlcd92.lyr . This is a land cover
map of a portion of Colorado in 1992. Q. Describe this raster.
4.   Open the file nlcd92_code.txt using Wordpad.  Q. How many strip mines
cells are there?
5.   Make a new grid of friction costs called friction  by reclassifying [see more
detailed instructions below] your land c over raster. Instead of having 13 different
classes, I would simplify th e classes to 6-7. Assign friction values based on your
own judgment. That is, do you think it would be easier for a horse to cross a
pasture or a strip mine cell? For fun, make the one category really expensive (e.g.
100 for mines).
6.   Q . Write down in the table below your fric tion values for each class. Include the
table and a short justif ication in your report.

Land Cover / Land Use  Friction Value
   
  2
           
7.    To reclassify your grid, use the function  Reclassify and enter the new values
on the right. [Hint: click on the �??U nique�?� button on the right panel].
8.   Now, load the point file  hay.shp. This is the hay bale  location. You�??ll run the
cost distance  function. This is how you use it (of course, you should read the
Help Menu as well):
a.   Source data: hay.shp file
b.   Cost raster:  friction 
c.   Output raster:  accost1  
d.   Maximum distance: (leave blank)
e.   Backlink: bklink1
9.   Q. Examine your accumulated cost grid (accost1). Use the contour function to
create isocost lines (lines representing same cost). Check the (min, max) values to
choose a reasonable interval. Comment on the  general aspect of the raster. Make a
figure with your contours.
10. Add your horse1.shp , which shows the initial location of the first horse. Now,
calculate the least cost path. Click on Spatial Analyst  �?�  Distance  �?�  Shortest
Path.
a.   Path to: horse1.shp 
b.   Cost distance:  accost1
c.   Cost direction: bklink1
d.   Path type: for each cell (since our  house dataset is just a point)
e.   Output feature: lcpath1.shp
11. Q . Examine your results, comment on the path? 
12. Now, add the location of the second horse (horse2.shp ). Since the origin (bale
of hay) is the same, you DO NOT HAVE to  recalculate the accumulated cost or
back link grids (item 8). (Why?) Repeat only step (10) using your  horse2 file.
Make a figure (can include both horse 1 & 2 on same figure).
13. Q . How much will �??cost�?� horse 1 & 2 to  get to the hay bale, according to your
GIS analysis?   
14. Add the DEM  dem_co. Now, you�??ll use a more complex least cost path function
called Path Distance. In this analysis, we will correct for the true distance based
on elevation and correct for slope (i.e . upward slope is more expensive,
downward slope is less expensive). Open  the function �??Path Distance�??. Again, I
will show you how to use it but you should also read in Help.
a.   Input source data:  hay.shp
  3
b.   Output distance raster: accdem
c.   Input cost raster:  friction 
d.   Input surface raster: dem_co
e.   Output back link: bkdem 
f.   Vertical Parameters
i.   Input vertical raster:  dem_co
ii.   Vertical factor: Linear
iii.  Zero Factor: 1
iv.  Low cut angle: -5.000
v.   High cut angle: 5.000
vi.  Slope: 0.2 (do you understand why it�??s 0.2?)
g.   Q : Draw a graph similar to this one from the Help menu, which is using
the default values, but with your  new vertical parameters 

Comment: the slope value parameter refers to the line slope of th e factor, not terrain
slope.
15. Calculate the new least cost paths for horse1 and horse2 respectively using the
cost path function. Remember to use th e new accumulated an d back link grids.
16. Q. Were there noticeable differences? In which parts of the landscape did you
find noticeable differences?   [Hint: you may want to calculate a slope grid, color
code slopes smaller than 5% and see if th e path seeks low slope terrain]. Make a
map.
17. Q. If you wanted to examine only the impact of the terrain on your path,
disregarding the impact of friction valu es, how would you trick the function? You
can try and see if there is any substantial difference between paths.
18. Remove all your files, EXCEPT your land cover and friction grids.
19. Add the file manybales.shp . Suppose now we have fi ve different locations
the horses can choose to go. We are going to use a similar function to calculate an
allocation raster in addition to your accumulated cost and backlink. Open Cost
Allocation and use your  manybales file as the source, your  friction  as
cost raster. Name your allocation raster  baleshed, your accumulated cost
raster  accmany and your back link grid  bkmany.  Q . Examine your new
accumulated cost.
20. Q. Examine your baleshed  raster. What does each allocation area mean? How
would you interpret these zones? [Hint: easier to answer after item (22)
  4
21. Add the file manyhorses.shp. Calculate the least cost path following (10)
with new path to, cost di stance and direction grid.
22. Q . Make a figure showing the horses, the bales of hay, and the allocation grid on
the background.
23. Q . What are the equivalent rasters for  back link and allocation in hydrologic
modeling?
24. Remove all files, except your land cover raster.
25. Background 2: Suppose now you�??re working for a logging company in the same
area. Your objective is to design logging trails to access commercial trees and
bring them to any part of the road infras tructure already in place, which will be
your origin to the least cost path analysis. 
26. First, you have to create a road raster . Use the con statement in the raster
calculator and assign a value of 1 to class # 23 and no value data otherwise
(remember, zero is a legitimate class). Name the output grid roads .
27. Create a new friction grid (see 6 & 7) but remember: your objective now is to
minimize transportation costs. Is it cheaper to transport a timber log through a
bare rock or grassland cell ? Name your new friction grid friclog.  Q . Include
the table below in your report and a short justification for your friction values.

Land Cover / Land Use  Friction Value
               
28. Calculate the accumulative cost and the back link grid; name them  acclog  and
bklog  respectively.
29. Load your trees.shp; this file shows the location of all harvestable trees.
Calculate cost path using your trees as destinations and your accumulated cost and
back link grids that you calculated above. Name output logtrails.
30. Now, we will calculate what is known as �??hauling traffic�?� raster. We will use the
Shreve stream order classification from hydrologic modeling. But first, we have
to reclassify your bklog  to match the flow direction code (see below). Name
new raster fdirlog.

  5

Back Link Direction Code  Flow Direction Code

32. Open the function �??Stream Order�?? and enter the appropriate rasters. Name output
raster  haultrfc  and method Shreve.
33. Q. Read your lecture notes and review how  the Shreve classification works. How
would you interpret each road�??s segment number in your  haultrfc  raster?
34. Q . Suppose you are the logging operation mana ger. Which logging trail segments
would require more maintenance? Why?
35. Q . Bonus (1 pt): There are similarities  between hydrologic  modeling and least
cost path analysis. Water fl ows to the lowest point (ori gin in LCP) in your raster
DEM following steepest descent rules (almost like following cheapest route in
LCP). What raster in least cost path analysis would be equivalent to the DEM? Is
it the friction, accumulated cost, or the back link grid? Explain your answer. Make
a 3D figure in ArcScene to  illustrate your answer.
Reply
0 Kudos
Highlighted
Esri Regular Contributor
You can use the Closest Facility solver to do this. Load your 1 facility as the Incident in the closest facility layer, the 500 locations into the Facility layer and then bring up the properties of the closest facility layer and on the analysis tab in the Facilities to Find, enter 500, click ok on the properties and then solve. You will get 500 shortest path routes from the 500 locations to the 1 facility. Also note, you can choose to travel from the facility or to the facility as your application may need. More help here:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Closest_facility_analysis/00470000004n...

and a tutorial on this is here:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Exercise_4_Finding_the_closest_fire_st...


Jay Sandhu
Reply
0 Kudos