GDAL
January 4, 2012, 3:15pm
1
#1530: g.region shrink / expand parameter
-------------------------+--------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.2
Component: Default | Version: 6.4.1
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Hi,
it would be really nice to have a shrink/expand parameter in g.region for
shrinking/expanding the current region.
Best,
Alessandro Frigeri
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1530> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
January 4, 2012, 3:29pm
2
#1530: g.region shrink / expand parameter
-------------------------+--------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.4.2
Component: Default | Version: 6.4.1
Keywords: | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by martinl):
Do you mean something like
{{{
g.region n=n+1000
}}}
it's working.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1530#comment:1> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
January 4, 2012, 4:35pm
3
#1530: g.region shrink / expand parameter
--------------------------+-------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4.2
Component: Default | Version: 6.4.1
Resolution: fixed | Keywords:
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by alf):
* status: new => closed
* resolution: => fixed
Comment:
Martin,
Yes, that is basically what I was meaning, it's already there and works,
and the manual describe it just fine!
Maybe in future the shrink and expand parameters can be introduced fro a
quickest working region trimming.
Ciao,
Alessandro
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1530#comment:2> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
January 4, 2012, 4:49pm
4
#1530: g.region shrink / expand parameter
--------------------------+-------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4.2
Component: Default | Version: 6.4.1
Resolution: fixed | Keywords:
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment(by martinl):
Replying to [comment:2 alf]:
> Maybe in future the shrink and expand parameters can be introduced fro a
quickest working region trimming.
I agree, I would be able to imagine something like
{{{
# g.region n=n+10 s=s-10 w=w-10 e=e+10
g.region offset=10
# g.region n=n-10 s=s+10 w=w+10 e=e-10
g.region offset=-10
}}}
Make sense?
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1530#comment:3> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
January 4, 2012, 9:52pm
5
#1530: g.region shrink / expand parameter
--------------------------+-------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4.2
Component: Default | Version: 6.4.1
Resolution: fixed | Keywords:
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Comment(by dickeya):
To add to this idea, I think it would be very useful to grow/shrink the
region based on number of pixels instead of current projection units.
This would ensure exact alignment when changing a region with non-int
units. I currently do this via python.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1530#comment:4> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
January 5, 2012, 10:33am
6
#1530: g.region shrink / expand parameter
--------------------------+-------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.4.2
Component: Default | Version: 6.4.1
Resolution: | Keywords:
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by alf):
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:3 martinl]:
> Replying to [comment:2 alf]:
>
> > Maybe in future the shrink and expand parameters can be introduced fro
a quickest working region trimming.
>
> I agree, I would be able to imagine something like
>
> {{{
> # g.region n=n+10 s=s-10 w=w-10 e=e+10
> g.region offset=10
>
> # g.region n=n-10 s=s+10 w=w+10 e=e-10
> g.region offset=-10
> }}}
>
> Make sense?
Yes Martin! For the parameter name I'd rather go with the term 'expand',
and the following entry in the manual
(...)
expand=value
Expand (positive offset value) or shrink (negative offset value)
current region
(...)
Alessandro
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1530#comment:5> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
January 5, 2012, 11:28am
7
#1530: g.region shrink / expand parameter
--------------------------+-------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.1
Resolution: | Keywords: g.region, expand
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by martinl):
* keywords: => g.region, expand
* milestone: 6.4.2 => 6.4.3
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1530#comment:6> ;
GRASS GIS <http://grass.osgeo.org >
GDAL
April 17, 2013, 9:03am
8
#1530: g.region shrink / expand parameter
--------------------------+-------------------------------------------------
Reporter: alf | Owner: grass-dev@…
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.4.3
Component: Default | Version: 6.4.1
Resolution: fixed | Keywords: g.region, expand
Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by hamish):
* status: reopened => closed
* resolution: => fixed
Comment:
g.region.grow module added to grass6 addons in r55843.
http://grasswiki.osgeo.org/wiki/AddOns/GRASS_6#g.region.grow
Instead of `rows=rows+2*n cols=cols+2*n` (or `rows=rows-2*n
cols=cols-2*n`) I took the easy way and made use of the g.region -a flag,
which rounds outwards to the nearest whole-cell. Feel free to reopen the
wish if you'd like to see a -c flag added to make the expand= (should it
be called amount= or extent=?) refer to cells not map units.
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1530#comment:7> ;
GRASS GIS <http://grass.osgeo.org >