[GRASS5] creating a new DEFAULT_WIND by copying the current WIND
glynn.clements at virgin.net
Tue Feb 11 00:43:11 EST 2003
Markus Neteler wrote:
> Just a quick comment here: The r.in.gdal provides a
> flag "-e" with the required code to enlarge the
> DEFAULT_WIND. Maybe we simply move this code portion
> to libgis and use it also for g.region?
The way in which r.in.gdal does it is a hack:
G__put_window( &def_wind, "../PERMANENT", "DEFAULT_WIND" );
Actually, G__put_window itself is something of a hack, as it
encourages individual modules to contain hardcoded assumptions about
the directory structure.
I suggest that a more correct way to do it would be to temporarily
switch the mapset to PERMANENT, then use:
G__put_window (window,"", "DEFAULT_WIND");
Also, it's arguable that r.in.gdal should be modifying the per-mapset
window rather than the default window; a normal user may not have the
necessary permissions to modify anything in PERMANENT.
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev