[GRASS-dev] [GRASS GIS] #2368: Python version of r.grow does not support shrinking

GRASS GIS trac at osgeo.org
Wed Jul 16 10:17:04 PDT 2014

#2368: Python version of r.grow does not support shrinking
 Reporter:  wenzeslaus                                          |       Owner:  grass-dev@…              
     Type:  enhancement                                         |      Status:  new                      
 Priority:  normal                                              |   Milestone:  7.1.0                    
Component:  Raster                                              |     Version:  svn-trunk                
 Keywords:  r.grow, r.grow.distance, r.buffer, r.buffer.lowmem  |    Platform:  Unspecified              
      Cpu:  Unspecified                                         |  
 While C version of `r.grow` supports shrinking (negative distance/radius)
 since r59735, the Python version of `r.grow` based on C module
 `r.grow.distance` and `r.mapcalc` expression supports only growing
 (positive distance/radius). Shrinking (negative buffer) is a useful
 feature, so I think we should add it.

 I'm not sure if negative distances can be added to `r.grow.distance`.

 If not, I would say that we need to use C implementation of `r.grow`
 (which might be even faster then the Python script version which calls
 several modules and creates temporary maps).

 If duplication of code would be an issue in case of C `r.grow` and
 `r.grow.distance`, we may consider adding some functions to the library if
 they are useful for more modules.

 `r.buffer` and `r.buffer.lowmem` does not seem to support it neither, as
 far as I know.

 `v.buffer` supports negative distances ("inward buffer" / "negative

Ticket URL: <https://trac.osgeo.org/grass/ticket/2368>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list