[GRASS-user] how to g.region

Raffaello Brondi raffaello.brondi at pisa.intecs.it
Wed Sep 12 13:01:15 EDT 2007


Hi all,

i'm using GRASS 6.2 for developing a Web Processing Service.
One of the operations offered by the service takes two raster maps as 
inputs.
The raster map resulting from this operation would have different 
spatial extents based on the input maps: the result would have the 
extent equal to the extent of one of the two input maps, or equal to the 
union of the extents of the two input maps or equal to the intersection 
of the extents of the two raster maps.
In order to develop the service i need to manage these four cases by 
changing the GRASS region.
Supposing that the input rasters are "raster1" and "raster2", the 
possible configurations are:

   1. region = raster1 --> g.region rast=raster1
   2. region = raster2 --> g.region rast=raster2
   3. region = the union of raster1 and raster2 --> g.region 
rast=raster1,raster2
   4. region = the intersection of raster1 and raster2 --> ?


As far as i see, using the g.region command, there is no way to specify 
the last point except to manually set the nord,sud,ovest and east 
values, but unfortunately i can not use this way.
Is there any other command in GRASS that i can use instead of g.region 
to set the current region as the intersection of two rasters?

Best regards

Raffaello Brondi




More information about the grass-user mailing list