Opened 14 years ago

Closed 11 years ago

Last modified 9 years ago

#1024 closed enhancement (fixed)

Let r.grow shrink raster

Reported by: cmbarton Owned by: grass-dev@…
Priority: normal Milestone: 6.5.0
Component: Raster Version: svn-develbranch6
Keywords: r.grow Cc:
CPU: All Platform: All

Description

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

Change History (6)

comment:1 by hamish, 14 years ago

Keywords: r.grow added

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

in reply to:  1 ; comment:2 by cmbarton, 14 years ago

Replying to 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

in reply to:  2 comment:3 by hamish, 14 years ago

Replying to 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

comment:4 by hamish, 11 years ago

Resolution: fixed
Status: newclosed

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

comment:5 by wenzeslaus, 9 years ago

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).

comment:6 by wenzeslaus, 9 years ago

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

Note: See TracTickets for help on using tickets.