[GRASS-user] Shortest path for a new road
Dylan Beaudette
dylan.beaudette at gmail.com
Fri Jan 26 14:55:47 EST 2007
On Friday 26 January 2007 03:12, Wolf Bergenheim wrote:
> Hi!
>
> I need to create a plan for a new road from a known source point, to a
> known destination area. I have a grid of elevation and land use for the
> region. So from that I can calculate a cost weight using r.walk or
> r.cost Now by using this I'd like to calculate a new raster or vector
> which would show the least cost path from source to destination.
>
> Is this possible? I know that with Arc/Info I can use the Spatial
> Analyst to do this, but I'd like to be able to do it with GRASS. Any ideas?
>
> --Wolf
Hi Wolf,
The usual approach in GRASS for this type of problem is:
1. define cost surface (slope is commonly used) but a distance map would work
as well (r.mapcalc "dist = 1")
2. create cumulative cost map (r.cost) along with the cost surface from step 1
3. simulate a drop of water 'draining' from some destination to the point of
least cost (your starting point) (r.drain)
4. use r.to.vect to vectorize the output from r.drain.
rather verbose example here:
http://casoilresource.lawr.ucdavis.edu/drupal/node/244
Cheers,
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
More information about the grass-user
mailing list