grass7.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html>
  3. <head>
  4. <TITLE>GRASS 7</TITLE>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <link rel="stylesheet" href="grassdocs.css" type="text/css">
  7. </head>
  8. <body bgcolor="white">
  9. <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
  10. <H2>NAME</H2>
  11. <EM><B>grass70</B></EM> - The GRASS startup program<BR>
  12. <H2>SYNOPSIS</H2>
  13. <B>grass70</B> [<B>-</B>] [<B>-v</B>] [<B>-h | -help | --help</B>]
  14. [<B>-text | -gui | -tcltk | -wx]</B>]
  15. [[[<B>&lt;GISDBASE&gt;/</B>]<B>&lt;LOCATION_NAME&gt;/</B>]
  16. <B>&lt;MAPSET&gt;</B>]
  17. <BR>
  18. <H2>DESCRIPTION</H2>
  19. <P>
  20. This program is used to start GRASS. It will parse the command line arguments
  21. and then initialize GRASS for the user. Since GRASS programs require a
  22. specific environment, this program must be called before any other GRASS
  23. program can run. The command line arguments are optional and provide the user
  24. with a method to indicate the desired user interface, as well as the desired
  25. mapset to work on.
  26. <H2>FEATURES</H2>
  27. <P>
  28. The GRASS program will save both the desired user interface and mapset.
  29. Thus, the next time the user runs GRASS, typing <EM>grass70</EM> (without any
  30. options) will start grass with the previous settings for the user interface
  31. and mapset.
  32. <P>
  33. If you specify a graphical user interface (Tcl/Tk or wxPython), the <EM>grass70</EM>
  34. program will try to verify that the system you specified exists and that you
  35. can access it successfully. If any of these checks fail, then <EM>grass70</EM>
  36. will automatically switch back to the text user interface mode.
  37. <H2>OPTIONS</H2>
  38. <P>
  39. All command line options are optional.
  40. <H3>Flags:</H3>
  41. <DL>
  42. <DT><B>-</B>
  43. <DD> Tries to start GRASS using location environment variables (see below)
  44. <DT><B>-h</B> <B>-help</B> <B>--help</B>
  45. <DD> Prints a brief usage message
  46. <DT><B>-text</B>
  47. <DD> Indicates that the text based user interface should be used
  48. <DT><B>-gui</B> (or <B>-tcltk</B>)
  49. <DD> Indicates that the Tcl/Tk based graphical user interface should be used
  50. <DT><B>-wx</B>
  51. <DD> Indicates that the new Python based graphical user interface should be used (wxgrass)
  52. <DT><B>-v</B> <B>--version</B>
  53. <DD> Prints the version for GRASS
  54. </DL>
  55. <H3>Parameters:</H3>
  56. <DL>
  57. <DT><B>GISDBASE</B>
  58. <DD> Initial database directory which should be a fully qualified path
  59. (e.g., /usr/local/share/grassdata)
  60. <DT><B>LOCATION_NAME</B>
  61. <DD> Initial location directory which is a subdirectory of GISDBASE
  62. <DT><B>MAPSET</B>
  63. <DD> Initial mapset directory which is a subdirectory of LOCATION_NAME
  64. <DT><B>Note</B>
  65. <DD> You must specify one of the following<BR><BR>
  66. MAPSET<BR>
  67. LOCATION_NAME/MAPSET<BR>
  68. GISDBASE/LOCATION_NAME/MAPSET<BR>
  69. </DL>
  70. <H2>ENVIRONMENT VARIABLES</H2>
  71. <H3>User Interface Environment Variable</H3>
  72. <P>
  73. The <EM>grass70</EM> program will check for the existence of an environment
  74. variable called GRASS_GUI which indicates the type of user interface for
  75. GRASS to use. If this variable is not set when <EM>grass70</EM> is run, then
  76. it will be created and then saved in the $HOME/.grassrc7 file for the next
  77. time GRASS is run. In addition to "text", "tcltk" or "wx", the GRASS_GUI variable
  78. can be set to the name of the GUI to use, for example "gis.m" or "wxgrass".
  79. <P>
  80. There is an order of precedence in the way <EM>grass70</EM> determines the user
  81. interface to use. The following is the hierarchy from highest precedence to
  82. lowest.
  83. <P>
  84. The user may add own environment variable settings to $HOME/.grassrc7 file
  85. which are used during next startup of GRASS (list of
  86. <a href=variables.html>implemented environment variables</a>).
  87. <DL>
  88. <DT><B>Interface precedence</B>
  89. <DD>Command line argument<BR>
  90. Environment variable GRASS_GUI<BR>
  91. Value set in $HOME/.grassrc7<BR>
  92. Default value - currently gis.m
  93. </DL>
  94. <H3>Tcl/Tk Environment Variables</H3>
  95. <P>
  96. If you choose to use the Tcl/Tk graphical user interface, then the following
  97. environment variables can be used to override your system default tclsh and
  98. wish commands. See the section immediately following the variable descriptions
  99. for an example.
  100. <DL>
  101. <DT><B>GRASS_TCLSH</B>
  102. <DD> Command to use to override tclsh
  103. <DT><B>GRASS_WISH</B>
  104. <DD> Command to use to override wish
  105. <DT><B>GRASS_PYTHON</B>
  106. <DD> Command to use to override python
  107. </DL>
  108. <H4>Example Use of GRASS Tcl/Tk Environment Variables</H4>
  109. <P>
  110. Suppose your system has Tcl/Tk 8.0 installed and you install your personal
  111. version of Tcl/Tk 8.3 binaries installed under $HOME/bin. You can use the
  112. above variables to have GRASS use the Tcl/Tk 8.3 binaries instead.
  113. <P>
  114. GRASS_TCLSH = $HOME/bin/tclsh8.3<BR>
  115. GRASS_WISH = $HOME/bin/wish8.3
  116. <H3>Addon path to extra local GRASS modules</H3>
  117. This environment variables allows to extend the GRASS paths to locally
  118. developed/installed modules which are not distributes through the standard
  119. release of GRASS.
  120. <P>
  121. GRASS_ADDON_PATH=/usr/mytools<BR>
  122. GRASS_ADDON_PATH=/usr/mytools:/usr/local/othertools
  123. <P>
  124. In this example above path(s) would be added to the standard GRASS path
  125. environment.
  126. <H3>Location Environment Variables</H3>
  127. <P>
  128. The Synopsis and Options sections above describe options that can be used to
  129. set the location and mapset that GRASS will use. These values can also be set
  130. with environment variables. However, specifying the location and mapset
  131. variables on the command line will override these environment variables. The
  132. available variables are as follows:
  133. <DL>
  134. <DT><B>LOCATION</B>
  135. <DD> A fully qualified path to a mapset
  136. (eg /usr/local/share/grassdata/spearfish60/PERMANENT). This environment variable
  137. overrides the GISDBASE, LOCATION_NAME, and MAPSET variables.
  138. <DT><B>GISDBASE</B>
  139. <DD> Initial database directory which should be a fully qualified path
  140. (eg /usr/local/share/grassdata)
  141. <DT><B>LOCATION_NAME</B>
  142. <DD> Initial location directory which is a subdirectory of GISDBASE
  143. <DT><B>MAPSET</B>
  144. <DD> Initial mapset directory which is a subdirectory of LOCATION_NAME
  145. </DL>
  146. <P>
  147. There are a variety of ways in which these variables can be used to specify
  148. the mapset to use. The following are some possible examples.
  149. <DL>
  150. <DT><B>Example 1</B>
  151. <DD> The environment variables are defined as follows:<BR><BR>
  152. LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT<BR>
  153. GISDBASE = /usr/local/share/grassdata<BR>
  154. LOCATION_NAME = spearfish60<BR>
  155. MAPSET = PERMANENT<BR><BR>
  156. Start GRASS with the following command:<BR><BR>
  157. grass70 -<BR><BR>
  158. GRASS will start with the mapset defined by LOCATION since the LOCATION
  159. variable overrides the other variables.<BR><BR>
  160. <DT><B>Example 2</B>
  161. <DD> The environment variables are defined as follows:<BR><BR>
  162. GISDBASE = /usr/local/share/grassdata<BR>
  163. LOCATION_NAME = spearfish60<BR>
  164. MAPSET = PERMANENT<BR><BR>
  165. Start GRASS with the following command:<BR><BR>
  166. grass70 -<BR><BR>
  167. GRASS will start with the mapset defined by
  168. GISDBASE/LOCATION_NAME/MAPSET.<BR><BR>
  169. <DT><B>Example 3</B>
  170. <DD> The environment variables are defined as follows:<BR><BR>
  171. LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT<BR>
  172. GISDBASE = /usr/local/share/grassdata<BR>
  173. LOCATION_NAME = spearfish60<BR>
  174. MAPSET = PERMANENT<BR><BR>
  175. Start GRASS with the following command:<BR><BR>
  176. grass70 /usr/home/grass/data/thailand/forests<BR><BR>
  177. GRASS will start with the mapset /home/grass/data/thailand/forests which
  178. overrides the environment variables.<BR><BR>
  179. <DT><B>Example 4</B>
  180. <DD> The environment variables are defined as follows:<BR><BR>
  181. LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT<BR>
  182. GISDBASE = /usr/local/share/grassdata<BR>
  183. LOCATION_NAME = spearfish60<BR>
  184. MAPSET = PERMANENT<BR><BR>
  185. Start GRASS with the following command:<BR><BR>
  186. grass70 swamps<BR><BR>
  187. GRASS will start with the mapset defined by GISDBASE/LOCATION_NAME/swamps
  188. since the command line argument for the mapset overrides the environment
  189. variable MAPSET.<BR><BR>
  190. <DT><B>Example 5</B>
  191. <DD> The environment variables are defined as follows:<BR><BR>
  192. LOCATION = /usr/local/share/grassdata/spearfish60/PERMANENT<BR>
  193. GISDBASE = /usr/local/share/grassdata<BR>
  194. LOCATION_NAME = spearfish60<BR>
  195. MAPSET = PERMANENT<BR><BR>
  196. Start GRASS with the following command:<BR><BR>
  197. grass70 thailand/forests<BR><BR>
  198. GRASS will start with the mapset defined by GISDBASE/thailand/forests
  199. since the command line arguments for the location and mapset overrides
  200. the environment variables LOCATION_NAME and MAPSET.<BR><BR>
  201. </DL>
  202. <H3>Note</H3>
  203. <P>
  204. Note that you will need to set these variables using the appropriate method
  205. required for the UNIX shell that you use.
  206. <H2>EXAMPLES</H2>
  207. <P>
  208. The following are some examples of how you could start GRASS
  209. <DL>
  210. <DT><B>grass70</B>
  211. <DD> Start GRASS using the default user interface. The user will be prompted
  212. to choose the appropriate location and mapset.
  213. <DT><B>grass70 -gui</B>
  214. <DD> Start GRASS using the Tcl/Tk based user interface. The user will be
  215. prompted to choose the appropriate location and mapset.
  216. <DT><B>grass70 -text</B>
  217. <DD> Start GRASS using the text based user interface. The user will be
  218. prompted to choose the appropriate location and mapset.
  219. <DT><B>grass70 -gui -</B>
  220. <DD> Start GRASS using the Tcl/Tk based user interface and try to obtain
  221. the location and mapset from environment variables.
  222. <DT><B>Other examples</B>
  223. <DD> See the <B>Location Environment Variables</B> section for further
  224. examples.
  225. </DL>
  226. <H2>BUGS AND CAVEAT</H2>
  227. <P>
  228. If you start GRASS using the Tcl/Tk interface you must have a <EM>wish</EM>
  229. command in your $PATH variable. That is, the command must be named
  230. <EM>wish</EM> and not something like <EM>wish8.3</EM>. By default, a Tcl/Tk
  231. installation does not create a <EM>wish</EM> command. Thus, the system
  232. administrator must create an appropriate link to the actual wish program.
  233. <P>
  234. For example, suppose Tcl/Tk 8.3 programs are installed in /usr/local/bin. Then
  235. the system administrator should go to the /usr/local/bin directory and run the
  236. commands <EM>ln -s wish8.3 wish</EM> and <EM>ln -s tclsh8.3 tclsh</EM> to
  237. properly install Tcl/Tk for use with GRASS.
  238. <P>
  239. Furthermore, if you have more than one version of Tcl/Tk installed, make sure
  240. that the version you want to use with GRASS is the first version found in
  241. your $PATH variable. GRASS searches your $PATH variable until it finds the
  242. first version of <EM>wish</EM>.
  243. <H2>FILES</H2>
  244. <EM>$UNIX_BIN/grass70</EM> - GRASS startup program (Linux, MacOSX etc.)<BR><BR>
  245. <EM>$WINDOWS_BIN/grass70.bat</EM> - GRASS startup program (MS-Windows)<BR><BR>
  246. <EM>$GISBASE/etc/Init.sh</EM> - GRASS initialization script called by
  247. <EM>grass70</EM><BR><BR>
  248. <EM>$GISBASE/etc/gis_set.tcl</EM> - Tcl/Tk script to set the
  249. location and mapset to use. Called by <EM>Init.sh</EM><BR><BR>
  250. <H2>SEE ALSO</H2>
  251. List of <a href=variables.html>implemented GRASS environment variables</a>.
  252. <p>
  253. <a href="http://grass.osgeo.org">GRASS Web site</a>
  254. <p>
  255. <a href="http://download.osgeo.org/grass/grass6_progman/">GRASS 6 Programmer's Manual</a>
  256. <H2>AUTHORS (of this page)</H2>
  257. Justin Hickey<br>
  258. Markus Neteler
  259. <p><i>Last changed: $Date$</i>
  260. <HR>
  261. <P><a href=index.html>Help Index</a>
  262. </body>
  263. </html>