Overview of Steps for Calculating Shortest/Least Cost Path
- Create raster file for each individual rule. These will be either distance/proximity rasters or direct conversion of feature to raster.
- Reclassify each rule to a common 0-10 scale. Remember, this is calculating the least cost path, so the lower the value the more optimal that piece of terrain is to traverse over. One (1) will therefore represent the most optimal terrain to traverse incrementing up to ten (10) which representing the least optimal. Zero (0) is reserved for those areas where it is impossible for the path to be drawn, regardless of any other criteria. Yes, this is the opposite from suitability analysis, which uses 10 as the most suitable.
- Create a layer containing zero's and one's. Areas with a zero represent terrain that the path cannot be drawn. Meaning this represents areas where at least one of your inputs contained a zero. There are two steps to complete this.
- Multiply all reclassified layers together in the Raster Calculator. This will generate a new raster where the areas that were reclassified as zero (0) in any layer will be marked as zero's.
- Replace all areas greater than zero (0) with a one (1). In the Raster Calculator, perform a boolean (true/false) operation looking for areas in the raster created above are greater than zero (0). For example, '[Calculation1] > 0'.
- Perform your weighted average on your original reclassified rasters. Identical to weighted averages we performed for suitability, in the Raster Calculator, the formula is [raster] * weight + [raster] * weight, etc..
- Remove the areas from the result of your weighted average that are impossible to traverse, meaning at least one reclassified raster contained a zero (0) at that cell's position. There are three steps to accomplish this.
- In Raster Calculator, multiply the result of your weighted average against the raster you generated (in step 3 above) containing the zero's and one's. This will replace the values in the areas impossible to traverse to zero's.
- Convert the result of the above step into an Integer. In Raster Calculator, click the double-arrow button on the bottom right to pull up some additional buttons. Click the Int button. This will bring up 'Int()', and your cursor should be within the parentheses. Double-click your raster generated in the last step and Evaluate.
- Use 'ArcToolbox/Spatial Analyst Tools/Extraction/Extract by Attributes' to permanently remove areas with a cell value of zero (0). The 'Where Clause' should be 'Value > 0'. You have now created your cost raster!
- Generate Cost Distance and Cost Direction rasters from your starting position. There are two steps to accomplish this.
- Select (highlight) your starting position.
- In the Spatial Analyst Toolbar, use the 'Distance/Cost Weighted' tool. Specify your starting position (which you just highlighted), your cost raster (completed in step 5), and check the box to 'Create Direction'.
- Generate your Path (finally, yeah?). There are two steps to complete this step.
- Select (highlight) your ending position.
- In the Spatial Analyst Toolbar, use the 'Distance/Shortest Path' tool. Specify your ending position (which you just highlighted), your Direction and Distance rasters (which you just generated in step 6), and the 'Path Type' should be 'For Each Cell'. Run It!
- Eight? There be no eight, matey. You scallywags be needing only seven, I tell ya.