[GRASS-user] distance from extent to origin cost surfaces
Dylan Beaudette
dylan.beaudette at gmail.com
Mon Mar 31 00:59:55 EDT 2008
On Sunday 30 March 2008, Hamish wrote:
> Dylan:
> > This is slightly incorrect -- as we are growing the cost surface to
> > compute the perimeter, when we should be shrinking it. However it
> > appears that r.grow cannot use a negative radius.
>
> create a negative mask, grow that, then invert again:
>
>
> r.mapcalc "inv_mask = if(isnull(mask), 1, null())"
>
> r.grow in=inv_mask out=inv_mask.grown
>
> r.mapcalc "mask_shrunk = if(isnull(inv_mask.grown), 1, null())"
>
>
>
> Hamish
>
>
>
I haven't looked at the source for r.grow -- does anyone know how much effort
it would take so that it could accept a negative "growth radius" ?
Dylan
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
More information about the grass-user
mailing list