[GRASS-dev] LOCATION/MAPSET, LOCATION_NAME

Glynn Clements glynn at gclements.plus.com
Fri Jul 21 08:05:07 EDT 2006


Maciej Sieczka wrote:

> grass61 --help says:
> 
> <snip>
> 
> Parameters:
>   GISDBASE                       initial database
>   LOCATION_NAME                  initial location
>   MAPSET                         initial mapset
> 
>   GISDBASE/LOCATION_NAME/MAPSET  fully qualified initial LOCATION directory
> 
> </snip>
> 
> I'm wondering whether the last sentence is correct. Shouldn't it be
> "fully qualified initial MAPSET directory"?

No, it should be "fully qualified initial mapset directory", without
capitalisation.

Historically, the environment variable LOCATION contained the full
path to the mapset directory (which is why the GRASS variable for the
location is called LOCATION_NAME rather than just LOCATION).

We stopped storing those parameters in environment variables because
environment variables cannot easily be changed within a GRASS session
(e.g. the g.mapset command cannot change them). Instead, each script
which needs to use those parameters has to obtain them itself using
g.gisenv.

> To add to confussion,
> http://grass.itc.it/grass61/manuals/html61_user/grass6.html under
> "Location Environment Variables" describes a LOCATION variable as "A
> fully qualified path to a mapset". I think this variable name doesn't
> reflect it's function and confuses the user. I know it cannot be changed
> in Grass 6.x, but maybe for Grass 7 it should replaced with, eg.,
> MAPSET_DIRECT or so? And LOCATION_NAME should be then replaced with
> plane LOCATION, to make things more obvious.

The LOCATION environment variable is no longer used, although it is
still common for scripts to use a shell variable with that name and
semantics.

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




More information about the grass-dev mailing list