Re: Calculating cost to port

Anna Petrášová <[email protected]>
Newsgroups gmane.comp.gis.grass.user
Message-ID <CAE0EDErpLk3yzBD2-NhureAFdFQaC2y_czYM_Hs8uM_KG5DjYg@mail.gmail.com>
Hi Daniel,

On Fri, Nov 10, 2017 at 11:03 AM, Daniel Victoria
<[email protected]> wrote:
> 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
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.