[GRASS-dev] [GRASS GIS] #1024: Let r.grow shrink raster

#1024: Let r.grow shrink raster
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Keywords: | Platform: All
      Cpu: All |
-------------------------+--------------------------------------------------
Grass can grow a raster, but there is no way to shrink a raster except to
completely thin it. If r.grow could accept values less than 1.0, this
could be accomplished.

That is, if you put in a value of 0.8, the raster would shrink by 20%. Is
this feasible given the code of r.grow?

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1024&gt;
GRASS GIS <http://grass.osgeo.org>

#1024: Let r.grow shrink raster
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: normal | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Resolution: | Keywords: r.grow
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hamish):

  * keywords: => r.grow

Comment:

example on how to shrink maps added to the r.grow man page in r41617. I
guess you could wrap that in a script called r.shrink if you really wanted
to.

btw, radius=1 is growing 1 cell outward. radius=0.5 is growing 1/2 a cell
outward (which is still outward). radius=0 is the status quo, and
radius=-xx would be inward in your proposal. it's a distance not a
multiplier.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1024#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1024: Let r.grow shrink raster
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: normal | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Resolution: | Keywords: r.grow
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by cmbarton):

Replying to [comment:1 hamish]:
> example on how to shrink maps added to the r.grow man page in r41617. I
guess you could wrap that in a script called r.shrink if you really wanted
to.
>

Guess I don't have the latest build on this (mine is a few weeks old now).
Is this on the web now?

>
> btw, radius=1 is growing 1 cell outward. radius=0.5 is growing 1/2 a
cell outward (which is still outward). radius=0 is the status quo, and
radius=-xx would be inward in your proposal. it's a distance not a
multiplier.

Oh. OK.

Michael

>
>
> Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1024#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1024: Let r.grow shrink raster
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: normal | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Resolution: | Keywords: r.grow
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):

Replying to [comment:2 cmbarton]:
> Guess I don't have the latest build on this (mine is a few weeks
> old now).

I just added it after reading your request and noticing that the method
wasn't documented anywhere.

> Is this on the web now?

AFAIR that's done weekly as part of the binary snapshot (Sat. nights).
Just click on the rev number in the trac response to see the diff.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1024#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1024: Let r.grow shrink raster
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Resolution: fixed | Keywords: r.grow
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => fixed

Comment:

instructions how to do it added to the help page in r41617. closing
ticket.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1024#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1024: Let r.grow shrink raster
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Resolution: fixed | Keywords: r.grow
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------

Comment(by wenzeslaus):

Note that `r.grow` in trunk (7.1) does not have this capability anymore,
follow #1024 for more updates. Since r62819 addons for 7 have
`r.grow.shrink` (older C version of `r.grow`).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1024#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1024: Let r.grow shrink raster
--------------------------+-------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 6.5.0
Component: Raster | Version: svn-develbranch6
Resolution: fixed | Keywords: r.grow
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------

Comment(by wenzeslaus):

Sorry for clutter, the number of ticket to follow is #2368.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1024#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>