[GRASS-dev] shrink region to non-null pixels

Hello list,

After extracting features from an image, I would like to shrink the
computational region only to the smallest area including non-null
pixels.

is there a module made for that, or should it be created?

Regards,
Yann
--
Yann Chemin
Senior Spatial Hydrologist
www.csu.edu.au/research/icwater
M +61-4-3740 7019

On Tue, Apr 20, 2010 at 8:24 AM, Yann Chemin <yann.chemin@gmail.com> wrote:

Hello list,

After extracting features from an image, I would like to shrink the
computational region only to the smallest area including non-null
pixels.

Try:

g.region -h
    zoom Shrink region until it meets non-NULL data from this raster map

So:
g.region zoom=yourmap -p

Please pay attention to the resolution etc. (so -p is suggested).

Markus

Yann wrote:

After extracting features from an image, I would like to
shrink the computational region only to the smallest area
including non-null pixels.

is there a module made for that, or should it be created?

g.region zoom=

it will start shrinking from the current region, run g.region rast=
first if you want to trim a map instead of zoom in on a feature
within it.

Using a reclass map with this can be very effective for isolating
areas containing single categories!

Hamish