0

I want to calculate least cost path between two points A and B using a DEM from which I got my slope, cost distance and back link raster. However, the resulted least cost path crosses through two lakes and I don't want that. I want them to be constraints, so the line should find another way to the destination point.

I created two shapefiles for the lakes, but how do I make the least cost tool take them into consideration?

1

1 Answer 1

1

You assign the cells where lake would be to NODATA in your DEM then build the cost distance raster. In the usage section of the help file for the Cost Distance tool is states:

Cell locations with NoData in the Input cost raster act as barriers in the cost surface tools. Any cell location that is assigned NoData on the input cost surface will receive NoData on all output rasters (cost distance, allocation, and backlink).

You would convert your polygon data into a binary raster where 1 is lake, 0 is nothing, then use the CON tool to recode the DEM so where your binary raster is 1 recode to NODATA otherwise set the cell to be the DEM elevation. So you should end up with a DEM with holes in it where the lakes are and these will not be considered during the path analyses.

1
  • Thanks, but I don't understand. The newly created binary raster (lake) is separate from my DEM of the whole region. How could I merge them together?
    – escplat12
    Commented Aug 15, 2017 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.