[GRASS-dev] [RFC] Glossary: GISDATABASE -> DATASTORE

Glynn Clements glynn at gclements.plus.com
Tue Mar 6 00:03:43 EST 2007


Hamish wrote:

> > g.gisenv MAPSET=<some_name>
> > 
> > but
> > g.gisenv LOCATION_NAME=<some_name>
> > 
> > and this is a frequent error to do:
> > 
> > g.gisenv LOCATION=<some_name>
> > 
> > And the user is right: there is a lack of symetry, and if we speak all
> > along about a "location" (implied in the current DATASTORE), its name
> > (and not its pathname) shall be set via LOCATION.
> 
> LOCATION makes more sense if doing it cleanly, but I believe it was
> named something different (_NAME) to limit bugs during the transition.
> There is always user confusion about shell variables vs. grass
> variables,

And, it seems, some developer confusion about shell variables versus
environment variables.

Also, it doesn't help that the documentation used to refer to GRASS
variables as environment variables.

> to have two different things using the same name would have
> been bad.
> 
> As this variable isn't typically seen by the user (it is handled by the
> g.mapset module in GRASS 6+), the extra _NAME part does more good than
> harm I think. Call it a historically beneficial wart.
> 
> By GRASS 7 probably enough time has passed to rename it "LOCATION".

Actually, I'd say that enough time has already passed. We stopped
exporting GRASS variables to the environment nearly 5 years ago:

	RCS file: /grassrepository/grass/src/general/g.gisenv/main.c,v

	revision 1.4
	date: 2002/03/26 13:25:09;  author: glynn;  state: Exp;  lines: +3 -3
	branches:  1.4.2;
	Don't export GISDBASE, LOCATION_NAME, MAPSET, LOCATION to the environment
	Fix scripts to obtain settings from g.gisenv

	RCS file: /grassrepository/grass/src/general/init/init.sh,v
	
	revision 1.36
	date: 2002/03/26 13:25:10;  author: glynn;  state: Exp;  lines: +2 -8
	branches:  1.36.2;
	Don't export GISDBASE, LOCATION_NAME, MAPSET, LOCATION to the environment
	Fix scripts to obtain settings from g.gisenv

And the GRASS variable has been called LOCATION_NAME for at least as
long as GRASS has been in CVS (1999-12-29).

The main issue is that we would have to fix all of the shell scripts
which use LOCATION as the path to the mapset directory and expect
"eval `g.gisenv`" to store the location in LOCATION_NAME rather than
in LOCATION. But that's equally true whether we change it now or
later.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list