[GRASS5] Re: [GRASSLIST:482] Re: where is $LOCATION set

H Bowman hamish_nospam at yahoo.com
Tue Jun 24 04:47:41 EDT 2003


> If you want these settings, you have to use g.gisenv, e.g.
[...]
> 
> At some point, it may be possible[1] to change these settings in the
> middle of a GRASS session; in that situation, any environment
> variables which were set at startup would no longer be correct.
> 
> [1] Actually, it's mostly possible now, but it's not officially
> supported, and there are still some rough edges (e.g. "persistent"
> programs such as tcltkgrass and NVIZ won't recognise the changes,
> XDRIVER can get confused etc).


A note about confusing XDRIVER.. Actually, I find this feature quite
useful.

background:
I mainly work with one big location (1000km^2) with 15 focus areas
within it (10km^2 each). Each focus area (=mapset) has its own raster
layers(e.g. topo, sunlight, etc). Things like the vector coastline live
in PERMANENT. I've also got "alias g.nm='g.gisenv set=MAPSET='" where
.nm stands for New Mapset..


I do this all the time:

g.nm mapset1
d.rast topo
d.vect coastline
d.otherstuff

g.nm mapset7
d.redraw

g.nm mapset12
d.redraw


Makes jumping around between focus areas for site comparisons quick and
easy, as it automatically resets to the new region limits, etc. Works
really well. Raster layers don't get unique names, but as most are
script generated/used and the mapset name is descriptive, that's not a
problem for me.

d.redraw fails quite well if a map from the old mapset doesn't exist in
the new.

I haven't had the guts to change mapsets while a backgrounded GRASS job
was running though (e.g. i.rectify).


So IMO we should fix the tcl menus first :)



I can report that heavy mapset swapping is very stable otherwise.

Hamish




More information about the grass-dev mailing list