#2368: Python version of r.grow does not support shrinking
----------------------------------------------------------------+-----------
Reporter: wenzeslaus | Owner:
grass-dev@…
Type: enhancement | Status:
new
Priority: minor | Milestone:
7.1.0
Component: Raster | Version:
svn-trunk
Keywords: r.grow, r.grow.distance, r.buffer, r.buffer.lowmem | Platform:
Unspecified
Cpu: Unspecified |
----------------------------------------------------------------+-----------
Comment(by mmetz):
Replying to [comment:3 glynn]:
> Replying to [comment:2 wenzeslaus]:
>
> > > > I'm not sure if negative distances can be added to
`r.grow.distance`.
>
> Having thought about this some more ...
>
> In the case where you're interested in the distance= map (rather than
the value= map), distance inside is just as meaningful as distance
outside.
>
> An r.shrink.distance module would be structurally similar (i.e. a near
clone), so it makes sense to try to keep them in the same module.
>
> The easiest change would be to have an "invert" flag which caused the
distance= map to contain the distance from the nearest null cell
(currently, it's the distance from the nearest non-null cell, so the non-
null cells themselves have a distance of 0).
Attached is a minimally invasive patch to add a new flag to
r.grow.distance, calculating the distance to the nearest null cell.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2368#comment:6>
GRASS GIS <http://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev