[GRASS-user] how to g.region

Wolf Bergenheim wolf+grass at bergenheim.net
Wed Sep 12 16:19:41 EDT 2007


On 12.09.2007 20:01, Raffaello Brondi wrote:
>   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?

Hello,

I assume you have some kind of programing language which executes grass
commands. Can you parse the output? If so then you could do it like this:

g.region rast=raster1
g.region -p (parse the output, into rast1north, rast1east, rast1west,
rast1south, etc)
g.region rast=raster2
g.region -p (parse the output, into rast2north, rast2east, rast2west,
rast2south, etc)
g.region north=(min of rast1north, rast2northe) etc for other parameters.


Hope this helps,
--Wolf

-- 

<:3 )---- Wolf Bergenheim ----( 8:>




More information about the grass-user mailing list