[GRASS-user] how to g.region

Glynn Clements glynn at gclements.plus.com
Mon Sep 17 16:11:58 EDT 2007


Raffaello Brondi wrote:

> > This is not very efficient, and more like 'g.region zoom=', but you could
> > do:
> >
> > g.region rast=map1,map2
> > r.mapcalc 'intersect= if(!isnull(map1) && !isnull(map2), 1, null())'
> > g.region zoom=intersect
> > g.remove intersect
> >
> >
> > But probably Wolf's method is what you want.
> 
> This is the solution i need :).

No it isn't. You should be using Wolf's approach and computing the
intersection yourself.

However, rather than using "g.region rast=... ; g.region -p", it's
simpler to just use "r.info -sg map=...".

Creating a whole new map just so that you can find its bounds is
gratuitously inefficient.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list