[GRASS-dev] v.in.ogr -r and -e
Glynn Clements
glynn at gclements.plus.com
Tue Nov 6 04:46:51 EST 2007
Hamish wrote:
> Hamish:
> > > In doing that I noticed that the "-e" flag doesn't seem to be connected to
> > > any code. Anyone know what it is supposed to do? (added in cvs
> > > vector/v.in.ogr/main.c rev 1.29)
> Markus:
> > It should do the same as r.in.gdal:
> > -e Extend location extents based on new dataset
> >
> > To modify the DEFAULT_WIND file according to the map extent.
>
> see attached patch. (untested)
>
>
> question- earlier in the v.in.ogr code as part of the projection-override check
> there is a comment:
> /* G_get_window seems to be unreliable if the location has been changed */
> G__get_window ( &loc_wind, "", "DEFAULT_WIND", "PERMANENT");
>
>
> should we worry about that for the extend flag?
No. The code introduced by the patch doesn't use G_get_window().
G_get_window() caches the window the first time that it's called, and
returns the cached value thereafter. Even if the mapset directory, the
value of WIND_OVERRIDE, or the contents of the WIND/$WIND_OVERRIDE
file change, the cached value will always be returned.
If you need to allow for such changes, use G__get_window(), which
doesn't cache anything. G_get_default_window() just calls
G__get_window(window,"","DEFAULT_WIND","PERMANENT"), and so doesn't
cache.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list