[GRASSLIST:3663] Re: no $LOCATION -> problems with gstat
Glynn Clements
glynn.clements at virgin.net
Sat May 11 12:12:22 EDT 2002
Stephan Holl wrote:
> I updated my GRASS from cvs today, and now $LOCATION is empty, but gstat
> depends on $MAPSET, $GISDBASE and $LOCATION.
> Otherwise it cannot access the GRASS-sitelists.
> How can I set these variables during GRASS_startup?
1. The crude but simple way:
eval `g.gisenv`
LOCATION=$GISDBASE/$LOCATION_NAME/$MAPSET
export GISDBASE LOCATION_NAME MAPSET LOCATION
2. The slightly longer way:
eval `g.gisenv get=GISDBASE`
eval `g.gisenv get=LOCATION_NAME`
eval `g.gisenv get=MAPSET`
LOCATION=$GISDBASE/$LOCATION_NAME/$MAPSET
export GISDBASE LOCATION_NAME MAPSET LOCATION
Option 2 has the advantage of not consuming excessive environment
space when there are lots of settings in $GISRC.
--
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-user
mailing list