.TH g.gisenv 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBg.gisenv\fR\fR - Outputs and modifies the user's current GRASS variable settings. .SH KEYWORDS general, settings .SH SYNOPSIS \fBg.gisenv\fR .br \fBg.gisenv help\fR .br \fBg.gisenv\fR [\-\fBsn\fR] [\fBget\fR=\fIVARIABLE\fR] [\fBset\fR=\fIVARIABLE=value\fR] [\fBstore\fR=\fIstring\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Flags: .IP "\fB\-s\fR" 4m .br Use shell syntax (for "eval") .IP "\fB\-n\fR" 4m .br Don't use shell syntax .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .PP .SS Parameters: .IP "\fBget\fR=\fIVARIABLE\fR" 4m .br GRASS variable to get .IP "\fBset\fR=\fIVARIABLE=value\fR" 4m .br GRASS variable to set .IP "\fBstore\fR=\fIstring\fR" 4m .br Where GRASS variable is stored .br Options: \fIgisrc,mapset\fR .br Default: \fIgisrc\fR .PP .SH DESCRIPTION When a user runs GRASS, certain variables are set specifying the GRASS data base, location, mapset, peripheral device drivers, etc., being used in the current GRASS session. These variable name settings are recognized as long as the user is running a GRASS session. .SH OPTIONS No prompts are given to the user when running \fIg.gisenv\fR. If run without arguments, \fIg.gisenv\fR lists all of the user's current GRASS variable settings. Results are sent to standard output, and may look like this: \fC .DS .br GISDBASE=/opt/grassdata/ .br LOCATION_NAME=spearfish .br MAPSET=PERMANENT .br .DE \fR In this example, the full path name of the user's current location (i.e., $LOCATION_NAME) is /opt/grassdata/spearfish, and the full path name of the user's current mapset (i.e., $MAPSET) is /opt/grassdata/spearfish/PERMANENT. .PP If the user specifies a \fIvariable_name\fR on the command line (e.g., g.gisenv MAPSET), only the value for that particular GRASS variable is output to standard output. Possible variable names depend on the user's system, see \fIvariables list\fR for details. .PP While other variables may be associated with each GRASS session (e.g., GRASS_GUI, GIS_LOCK, and other variables), those stated below are essential. .IP "\fIGISDBASE\fR .br The $GISDBASE is a directory in which all users' GRASS data are stored. Within the $GISDBASE, data are segregated into subdirectories (called "locations") based on the map coordinate system used and the geographic extent of the data. Each \(dqlocation" directory itself contains subdirectories called \(dqmapsets"; each "mapset" stores "data base elements" - the directories (e.g., the cell, cellhd, vector, etc., directories) in which GRASS data files are actually stored. .IP "\fILOCATION_NAME\fR .br The user must choose to work with the data under a single GRASS location within any given GRASS session; this location is then called the \fIcurrent GRASS location\fR, and is specified by the variable $LOCATION_NAME. The $LOCATION_NAME is the GRASS data base location whose data will be affected by any GRASS commands issued during the user's current GRASS session, and is a subdirectory of the current $GISDBASE. Each "location" directory can contain multiple "mapset" directories (including the special mapset PERMANENT). Maps stored under the same GRASS $LOCATION_NAME (and/or within the same MAPSET) must use the same coordinate system and typically fall within the boundaries of the same geographic region (aka, "location"). .IP "\fIMAPSET\fR .br Each "mapset" contains a set of maps relevant to the $LOCATION_NAME directory in which it appears. Each $LOCATION_NAME can contain multiple mapsets. (Mapsets which fall under the same $LOCATION_NAME all contain data geographically relevant to the $LOCATION_NAME, and all store data in the same map coordinate system. Frequently, maps are placed into different mapsets to distinguish file ownership - e.g., each user might have his own mapset, storing any maps that he has created and/or are relevant to his work.) During each GRASS session, the user must choose one mapset to be the \fIcurrent mapset\fR; the current mapset setting is given by $MAPSET, and is a subdirectory of $LOCATION_NAME. During a single GRASS session, the user can use available data in any of the mapsets stored under the current $LOCATION_NAME directory that are in the user's mapset search path and accessible by the user. However, within a single GRASS session, the user only has \fIwrite\fR access to data stored under the \fIcurrent mapset\fR (specified by the variable $MAPSET). .PP Each "mapset" stores GRASS data base elements (i.e., the directories in which GRASS data files are stored). Any maps created or modified by the user in the current GRASS session will be stored here. The $MAPSET directory PERMANENT is generally reserved for the set of maps that form the base set for all users working under each $LOCATION_NAME. .PP Once within a GRASS session, GRASS users have access only to the data under a single GRASS data base directory (the \fIcurrent GRASS data base\fR, specified by the variable $GISDBASE), and to a single GRASS location directory (the \fIcurrent location\fR, specified by the variable $LOCATION_NAME). Within a single session, the user may only \fImodify\fR the data in the \fIcurrent mapset\fR (specified by the variable $MAPSET), but may \fIuse\fR data available under other mapsets under the same $LOCATION_NAME. .PP All of these names must be legal names on the user's current system. .SH NOTES The output from \fIg.gisenv\fR when invoked without arguments is directly usable by Bash. The following command will cast each variable into the UNIX environment: \fC .DS .br eval \(gag.gisenv\(ga .br .DE \fR This works only for \fIBash\fR. The format of the output is not compatible with other UNIX shells. .SS GRASS Debugging To print debugging messages, the variable DEBUG must be set to level equal or greater than 0: \fC .DS .br g.gisenv set="DEBUG=3" .br .DE \fR Levels: (recommended levels) .RE 0 - silence 1 - message is printed once or few times per module 3 - each row (raster) or line (vector) 5 - each cell (raster) or point (vector) .RE To disable debugging messages, DEBUG must be set back to 0: \fC .DS .br g.gisenv set="DEBUG=0" .br .DE \fR .SH SEE ALSO \fI g.access, g.filename, g.findfile, g.mapsets \fR .br \fI See also variables list \fR .SH AUTHOR Michael Shapiro, U.S.Army Construction Engineering Research Laboratory .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team