[GRASS-dev] Re: [GRASS GIS] #7: Location wizard: should predefine
DB connection for new location
Glynn Clements
glynn at gclements.plus.com
Thu Mar 13 14:46:49 EDT 2008
Patton, Eric wrote:
> > see the db.connect help page example for DBF (I usually just cut and
> > paste that to the command line when needed). It accepts variable
> > LOCATION, MAPSET, you don't need to hardcode it. (Be sure to keep the
> > path with $VARIABLES in single quotes!)
>
> Should each of $GISDABSE, $LOCATION_NAME, and $MAPSET have populated values
> on location startup? These variables always remain blank for each location that
> I try:
>
> ~ >echo $GISDBASE
>
> ~ >echo $LOCATION_NAME
>
> ~ >echo $MAPSET
>
> ~ >
>
> are these variables only available from the shell if I export `g.gisenv` or eval `g.gisenv`
> first?
Those are GRASS variables, not environment variables.
The code for the file-based drivers (DBF, SQLite) parses the database
name and replaces any occurences of $MAPSET etc with the value of the
corresponding GRASS variable.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list