[GRASS5] $LOCATION or not $LOCATION ?

Glynn Clements glynn.clements at virgin.net
Wed May 15 11:03:24 EDT 2002


Markus Neteler wrote:

> for some time the $LOCATION variable is gone now and must
> be constructed with 'g.gisenv'. As far as I know the underlying
> idea was to allow for GRASS parallel sessions.

The motivation was to allow changing the location/mapset within a
session.

> Since that feature is not (yet) functional,

AFAICT, it is functional:

	g.gisenv set=LOCATION_NAME=spearfish
	d.rast elevation.dem
	g.gisenv set=LOCATION_NAME=global
	d.rast nations

Except that anything which uses the monitor's "list" pad (auto-redraw,
d.save, d.redraw etc) won't work. But that's a fundamental design
flaw, with no simple fix.

Note that the above example would have worked before the settings were
removed from Init.sh. However, anything which used the environment
variables (e.g. tcltkgrass, nviz, and most scripts) would continue to
use the settings with which the session was started.

Reflecting $GISRC into the environment was a partial work-around for
broken programs. The simplest way to find the bugs is to remove the
work-around.

> should we re-enable
> the $LOCATION (e.g. in ETC/Init.sh) until GRASS parallel sessions
> become possible? $LOCATION is pretty often used and quite
> convenient over constructing (more or less) on the fly with g.gisenv.

No.

If users want to set LOCATION for their own use, they can do it in
~/.grass.bashrc. If it's set in Init.sh, there's a danger that it
might get used by programs or scripts.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list