2

My question is very similar to Cost Distance Analyst In QGIS?

However, I'm looking for a means by which I can create a raster displaying the cumulative cost of each pixel to a specified destination rather than simply the least cost path between sets of specified start & end points. In essence, creating a "friction" map in which each raster pixel's value is it's lowest "cost" to get from itself to a specified destination (polygon or single pixel).

I imagine there's a way to do this in QGIS using GRASS operations, but can't figure out how to produce such a map -- does anyone know how? I would imagine it to be the r.cost() function, but without the need to specify start points and stop points.

2

The tool you are looking for is the SAGA tool Accumulated Cost (isotropic). To calculate the accumulated costs, you will need a "destination" point and the cost raster as input. Note that the destination point is needed as a raster cell, so you need to convert shape points (using e.g. the GDAL rasterize tool).

From there on, if you want, you can use the SAGA Least Cost Path tool to calculate the path from a defined source to your destination point.

  • 1
    Perfect. Thank you. Is there a way in which you could specify multiple, contiguous destination points? I.e., if I want each pixel to represent its accumulated cost to reaching the closest shoreline pixel of a lake (a group of identically-classed pixels), is there a way to specify that? – jbukoski Apr 19 '16 at 13:32
  • In this case I would use your multiple destination points / lake (all points as cells in one raster withe the value 1, the rest of the raster should have the value 0 or NODATA) as input for the QGIS "raster proximity tool" in the raster tool menu. This gives you the desired result, a raster withe the distance values form your destination points. – Miron Apr 20 '16 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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