2

R.cost.full from the GRASS algorithm calculates an accumulated cost surface (i.e. a map of travel costs) for a unit cost layer/friction map. The output is a raster map where each grid cell has a value that represents the costs for getting to the closest source (e.g. the next town). Is there a possibility to extract which town is the closest source of each grid cell?

My intention is to get a second raster that contains the closest source (town) for all grid cells.

The manual states that by setting the parameter: outdir=name I can create a raster to contain movement directions. However this is not what I exactly need.

1

I am not sure about the options of r.cost exposed in QGIS processing, but if you run it in GRASS directly, r.cost has an output option nearest, which gives you a raster map where each cell has the value of the nearest point.

  • that's a good one. I don't know how I could oversee that. will give it a try. thanks! – joaoal Feb 7 '17 at 20:04
  • works. one can eaven see the movement directions. I also saw that the option is available in the grass gui. I'm surprised that qgis does not implement all functions of the algorithm in its gui. – joaoal Mar 22 '17 at 13:39

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.