[GRASSLIST:4841] Re: best way to grow a distance layer?
Markus Neteler
neteler at itc.it
Sat Oct 26 10:37:16 EDT 2002
On Fri, Oct 25, 2002 at 06:28:29PM -0400, William W. Hargrove wrote:
> I want to grow distance rings around some features in a large, high resolution
> map.
>
> Looks like r.buffer will do the job, but it only takes up to 60 buffer rings,
> and this won't get me to the edge of the large map with a resolution of one
> cell width.
>
> Is there a single command in GRASS that will grow a distance layer out to the
> edge of the map?
Not a single command, but a combination of two commands:
You can use r.cost with input map containing 1 as values. Then, to
translate the distance to meters, multiply with cell resolution.
Eg. something like distances to roads:
g.region rast=roads
r.mapcalc area.one=1
r.cost input=area.one output=distance start_rast=roads
r.mapcalc dist_meters="distance * ewres()"
Hope this helps somehow,
Markus
--
Markus Neteler
ITC-irst, Istituto per la Ricerca Scientifica e Tecnologica
Project on Predictive Models for the Environment
Via Sommarive, 18 - 38050 Povo (Trento), Italy
tel +39 0461 314 -520 (fax -591) http://mpa.itc.it
More information about the grass-user
mailing list