I just added a new -r flag to v.in.ogr. It limits import to features falling in the current region; ie sets the spatial= option automatically.
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)
I just added a new -r flag to v.in.ogr. It limits import to features falling in the current region; ie sets the spatial= option automatically.
Hamish,
cool, thanks!
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)
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.
> 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?
Hamish
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
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.