[GRASSLIST:4814] Re: how to zoom to all vectors

Glynn Clements glynn at gclements.plus.com
Fri Nov 12 12:11:45 EST 2004


Markus Neteler wrote:

> > I am trying to locate a vector map in relation to another vector map and
> > need to be able to do a zoom that somehow expands the region to cover
> > ALL vector maps in the mapset.
> > 
> > Does anyone have a script that currently does this?
> 
> Might there be the possibility to extend 
>  g.region
> to also accept multiple raster, vector maps? 
> For raster the new resolution could be averaged (or the user
> defines res=value).

The boundaries case shouldn't be a problem, i.e. allow multiple maps
or region files, and set the boundary to the union of all of the
individual boundaries.

However, regarding the resolution, it should probably be left
untouched unless a single raster= or region= value is provided.

If you were to support setting the resolution in the presence of
multiple raster=/region= options, it shouldn't be the average. The
minimum resolution would be a better choice.

For "aligned" rasters, the greatest common divisor would theoretically
be the best option (i.e. if one raster had 25m resolution, and the
other 20m resolution, the region should have a 5m resolution). 
However, this practical if the resolutions don't have a realistic
common divisor (if the resolutions are arbitrary floats, you could end
up with sub-nanometer resolution).

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




More information about the grass-user mailing list