[GRASS-user] Calculating cost to port

Daniel Victoria daniel.victoria at gmail.com
Fri Nov 10 08:03:45 PST 2017


Hi list,

I want to calculate a cost of getting from any cell in my raster to some
ports, considering roads network, and I though r.cost could solve this.

What I have is:
1) Cost raster map with cost per cell (10 for normal cells, 1 if it's a
road)
2) vector map containing several ports
3) start_raster has the same extent of the cost raster, but all cells == 1

This is the command I'm using
r.cost input=cost_map output=cum_cost stop_points=ports
start_raster=my_region

However, my results is a map will all values equal zero. Is it because the
stop_points in ports lay inside my start_raster? Thus r.cost reaches the
stop point right from the start?

My final result should be a map of distance to ports considering the roads
network.

Cheers
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20171110/67b3674b/attachment-0001.html>


More information about the grass-user mailing list