[GRASS-user] Calculating cost to port - now with rail
Hi list, A while ago I asked a similar question about calculating cost to port considering a road network. I got this sorted out and results look nice. But now I'd like to include some rail lines in the analysis. The problem is that if I just add rail lines to my cell cost raster, the rail lines will be treated as roads, that is, I could 'board a train' anywhere along the rail line and not only at the stations. I though about adding a buffer to the rail line with a very high cost (or null value). But that would fail where roads crosses rail lines. Is it possible to solve this using r.cost? Or do I need to use some other method, like v.net? Cheers Daniel ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Calculating cost to port
Wow, that was fast. I was just about to reply the I found out I should put the ports as starting points. And that is clearly stated in the manual https://grass.osgeo.org/grass70/manuals/r.cost.html#shortest-distance-surfaces Thanks all Cheers On Fri, Nov 10, 2017 at 2:21 PM Moritz Lennertwrote: > Le Fri, 10 Nov 2017 16:03:45 +, > Daniel Victoria a écrit : > > > 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 > > Just try it with r.cost input=cost_map output=cum_cost > start_points=ports > > Moritz > ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Calculating cost to port
Le Fri, 10 Nov 2017 16:03:45 +, Daniel Victoriaa écrit : > 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 Just try it with r.cost input=cost_map output=cum_cost start_points=ports Moritz ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Calculating cost to port
Hi Daniel, On Fri, Nov 10, 2017 at 11:03 AM, Daniel Victoriawrote: > 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. I think it should be r.cost input=cost_map output=cum_cost start_points=ports your ports are the starting points. Anna > > Cheers > Daniel > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > https://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Calculating cost to port
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 ___ grass-user mailing list grass-user@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-user