1g.gisenv(1)                   Grass User's Manual                  g.gisenv(1)
2
3
4

NAME

6       g.gisenv  - Outputs and modifies the user's current GRASS variable set‐
7       tings.
8

KEYWORDS

10       general
11

SYNOPSIS

13       g.gisenv
14       g.gisenv help
15       g.gisenv   [get=VARIABLE]     [set="VARIABLE=value"]     [store=string]
16       [--verbose]  [--quiet]
17
18   Parameters:
19       get=VARIABLE
20           GRASS variable to get
21
22       set=
23           GRASS variable to set
24
25       store=string
26           Where GRASS variable is stored
27           Options: gisrc,mapset
28           Default: gisrc
29

DESCRIPTION

31       When  a user runs GRASS, certain variables are set specifying the GRASS
32       data base, location, mapset, peripheral  device  drivers,  etc.,  being
33       used  in  the  current GRASS session.  These variable name settings are
34       recognized as long as the user is running a GRASS session.
35

OPTIONS

37       No prompts are given to the user when running g.gisenv.  If run without
38       arguments, g.gisenv lists all of the user's current GRASS variable set‐
39       tings.  Results are sent to standard output, and may look like this:
40       GISDBASE=/usr/grass5/data
41       LOCATION_NAME=spearfish
42       MAPSET=PERMANENT
43        In this example, the full path name of  the  user's  current  location
44       (i.e., $LOCATION_NAME) is /usr/grass5/data/spearfish, and the full path
45       name   of   the   user's   current   mapset    (i.e.,    $MAPSET)    is
46       /usr/grass5/data/spearfish/PERMANENT.
47
48       If  the  user  specifies  a  variable_name  on  the command line (e.g.,
49       g.gisenv MAPSET), only the value for that particular GRASS variable  is
50       output  to  standard  output.   Possible  variable  names depend on the
51       user's system, see variables list for details.
52
53       While other variables may be associated with each GRASS session  (e.g.,
54       DIGITIZER,  PAINTER,  DISPLAY, and other variables), those stated below
55       are essential.
56
57       GISDBASE
58              The $GISDBASE is a directory in which all users' GRASS data  are
59              stored.   Within  the $GISDBASE, data are segregated into subdi‐
60              rectories (called "locations") based on the map coordinate  sys‐
61              tem used and the geographic extent of the data.  Each "location"
62              directory itself contains subdirectories called "mapsets";  each
63              "mapset"  stores  "data base elements" -- the directories (e.g.,
64              the cell, cellhd, dig, etc., directories) in  which  GRASS  data
65              files are actually stored.
66
67       LOCATION_NAME
68              The  user must choose to work with the data under a single GRASS
69              location within any given GRASS session; this location  is  then
70              called the current GRASS location, and is specified by the vari‐
71              able $LOCATION_NAME.  The $LOCATION_NAME is the GRASS data  base
72              location  whose  data  will  be  affected  by any GRASS commands
73              issued during the user's current GRASS session, and is a  subdi‐
74              rectory of the current $GISDBASE.  Each "location" directory can
75              contain multiple "mapset"  directories  (including  the  special
76              mapset  PERMANENT).   Maps  stored  under  the  same GRASS LOCA‐
77              TION_NAME (and/or within the same  MAPSET)  must  use  the  same
78              coordinate  system  and  typically fall within the boundaries of
79              the same geographic region (aka, "location").
80
81       MAPSET
82              Each "mapset" contains a set  of  maps  relevant  to  the  LOCA‐
83              TION_NAME directory in which it appears.  Each LOCATION_NAME can
84              contain multiple mapsets.  (Mapsets which fall  under  the  same
85              LOCATION_NAME  all  contain  data geographically relevant to the
86              LOCATION_NAME, and all store data in  the  same  map  coordinate
87              system.   Frequently,  maps are placed into different mapsets to
88              distinguish file ownership -- e.g., each user might have his own
89              mapset, storing any maps that he has created and/or are relevant
90              to his work.) During each GRASS session, the  user  must  choose
91              one mapset to be the current mapset;  the current mapset setting
92              is given by $MAPSET, and is a  subdirectory  of  $LOCATION_NAME.
93              During  a  single GRASS session, the user can use available data
94              in any of the mapsets stored  under  the  current  LOCATION_NAME
95              directory that are in the user's mapset search path and accessi‐
96              ble by the user.  However, within a single  GRASS  session,  the
97              user  only  has  write  access  to data stored under the current
98              mapset (specified by the variable $MAPSET).
99
100       Each "mapset" stores GRASS data base elements (i.e., the directories in
101       which  GRASS  data  files are stored).  Any maps created or modified by
102       the user in the current GRASS session will be stored here.  The  MAPSET
103       directory PERMANENT is generally reserved for the set of maps that form
104       the base set for all users working under each LOCATION_NAME.
105
106       Once within a GRASS session, GRASS users have access only to  the  data
107       under  a single GRASS data base directory (the current GRASS data base,
108       specified by the variable $GISDBASE), and to a  single  GRASS  location
109       directory  (the  current  location,  specified  by  the variable $LOCA‐
110       TION_NAME).  Within a single session, the user may only modify the data
111       in  the current mapset (specified by the variable $MAPSET), but may use
112       data available under other mapsets under the same LOCATION_NAME.
113
114       All of these names must be legal names on the  user's  current  system.
115       For  UNIX  users,  names less than 14 characters and containing no non-
116       printing or space codes are permissible.  Examples of permissible names
117       include:  one, mymap, VeGe_map, and 1_for_me.  The underscore character
118       can safely be used in place of a blank for multiple-word names.
119

NOTES

121       The output from g.gisenv when invoked  without  arguments  is  directly
122       usable  by /bin/sh.  The following command will cast each variable into
123       the UNIX environment:
124
125
126       eval `g.gisenv`
127
128
129       This works only for /bin/sh. The format of the output is not compatible
130       with other UNIX shells.
131
132   GRASS Debugging:
133       To  print  debugging  messages, the variable DEBUG must be set to level
134       equal or greater than 0:
135
136
137       <TT>g.gisenv set="DEBUG=3"
138
139
140       Levels: (recommended levels)
141
142                      0 - silence
143
144                       1 - message is printed once or few times per module
145
146                       3 - each row (raster) or line (vector)
147
148                       5 - each cell (raster) or point (vector)
149       To disable debugging messages, DEBUG must be set back to 0:
150
151
152       <TT>g.gisenv set="DEBUG=0"
153
154

SEE ALSO

156       g.access
157       g.ask
158       g.filename
159       g.findfile
160       g.mapsets
161       variables list
162

AUTHOR

164       Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
165
166       Last changed: $Date: 2005-12-07 14:31:16 +0100 (Wed, 07 Dec 2005) $
167
168       Full index
169
170       © 2003-2008 GRASS Development Team
171
172
173
174GRASS 6.3.0                                                        g.gisenv(1)
Impressum