g.mapsets.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <h2>DESCRIPTION</h2>
  2. For basic information about GRASS <em>mapset</em>, <em>location</em>
  3. and <em>data base</em> refer to <a href="helptext.html">GRASS
  4. Quickstart</a>.
  5. <p>
  6. A <em>mapset</em> holds a distinct set of data layers, each relevant
  7. to the same (or a subset of the same) geographic region, and each
  8. drawn in the same map coordinate system. At the outset of every GRASS
  9. session, the user identifies a GRASS data base, location, and mapset
  10. that are to be the user's <em>current data base</em>, <em>current
  11. location</em>, and <em>current mapset</em> for the duration of the
  12. session; any maps created by the user during the session will be
  13. stored under the <em>current mapset</em> set at the session's outset
  14. (see <em><a href="g.mapset.html">g.mapset</a></em> [without an "s"]
  15. and <em><a href="g.gisenv.html">g.gisenv</a></em> for changing the
  16. mapset with a session).
  17. <p>
  18. The user can add, modify, and delete data layers that exist under
  19. their <em>current mapset</em>. Although the user can
  20. also <em>access</em> (i.e., use) data that are stored under
  21. <em>other</em> mapsets in the same GRASS location using the
  22. <tt>mapname@mapsetname</tt> notation or mapset search path, the user
  23. can only make permanent changes (create or modify data)
  24. located in the <em>current mapset</em>. The user's
  25. <em>mapset search path</em> lists the order in which other mapsets in
  26. the same GRASS location can be searched and their data accessed by the
  27. user. The user can modify the listing and order in which these mapsets
  28. are accessed by modifying the mapset search path; this can be done
  29. using the <em>g.mapsets</em> command. This program allows the user to
  30. use other's relevant map data without altering the original data
  31. layer, and without taking up disk space with a copy of the original
  32. map. The <tt>mapname@mapsetname</tt> notation may be used irrespective
  33. of the mapset search path, i.e., any map found in another mapset with
  34. sufficient <em><a href="g.access.html">g.access</a></em> privileges
  35. may be called in such a manner.
  36. <p>
  37. <em>g.mapsets</em> shows the user available mapsets under the current
  38. GRASS location, lists mapsets to which the user currently has access,
  39. and lists the order in which accessible mapsets will be accessed by
  40. GRASS programs searching for data files. The user is then given the
  41. opportunity to add or delete mapset names from the search path, or
  42. modify the order in which mapsets will be accessed.
  43. <p>
  44. When the user specifies the name of a data base element file (e.g., a
  45. particular vector map, raster map, <a href="i.group.html">imagery</a>
  46. group file, etc.) to a GRASS program, the program searches for the
  47. named file under each of the mapsets listed in the user's mapset
  48. search path in the order listed there until the program finds a file
  49. of the given name. Users can also specify a file by its mapset, to
  50. make explicit the mapset from which the file is to be drawn; e.g., the
  51. command:
  52. <div class="code"><pre>
  53. g.copy raster=soils@PERMANENT,my_soils
  54. </pre></div>
  55. ensures that a new file named <tt>my_soils</tt> is to be a copy of
  56. the file <tt>soils</tt> from the mapset PERMANENT.
  57. <p>
  58. In each location there is the special mapset <b>PERMANENT</b> included
  59. in the mapset search path, as this mapset typically contains base maps
  60. relevant to many applications. Often, other mapsets which contain sets
  61. of interpreted maps will be likewise included in the user's mapset search path.
  62. Suppose, for example, that the mapset <em>Soil_Maps</em> contains
  63. interpreted soils map layers to which the user wants access. The
  64. mapset <em>Soil_Maps</em> should then be included in the user's
  65. <em>search path</em> variable.
  66. <p>
  67. The <em>mapset search path</em> is saved as part of the current
  68. mapset. When the user works with that mapset in subsequent GRASS
  69. sessions, the previously saved mapset search path will be used (and
  70. will continue to be used until it is modified by the user
  71. with <em>g.mapsets</em>).
  72. <h2>NOTES</h2>
  73. By default <em>g.mapsets</em> adds to the current <em>mapset search
  74. path</em> mapsets named by <b>mapset</b> option. Alternatively mapsets
  75. can be removed (<b>operation=remove</b>) from the search path or
  76. defined by <b>operation=set</b>.
  77. <p>
  78. Users can restrict others' access to their mapset files through use
  79. of <em><a href="g.access.html">g.access</a></em>. Mapsets to which
  80. access is restricted can still be listed in another's mapset search
  81. path; however, access to these mapsets will remain restricted.
  82. <h2>EXAMPLES</h2>
  83. <h3>Selecting mapsets with the graphical mapset manager</h3>
  84. Using the <b>-s</b> flag, a convenient graphical mapset manager can
  85. be opened to select and deselect other mapsets (the actual mapset and
  86. the PERMANENT mapset are always selected):
  87. <div class="code"><pre>
  88. g.mapsets -s
  89. </pre></div>
  90. <center>
  91. <img src="g_mapsets_gui.png"><br>
  92. </center>
  93. <h3>Print available mapsets</h3>
  94. All available mapsets in the current location can be printed out by
  95. <div class="code"><pre>
  96. g.mapsets -l
  97. Available mapsets:
  98. PERMANENT user1 user2
  99. </pre></div>
  100. <h3>Add new mapset</h3>
  101. Add mapset 'user2' to the current mapset search path
  102. <div class="code"><pre>
  103. g.mapsets mapset=user2 operation=add
  104. </pre></div>
  105. The current mapset search path is changed accordingly
  106. <div class="code"><pre>
  107. g.mapsets -p
  108. Accessible mapsets:
  109. user1 user2
  110. </pre></div>
  111. <h3>Overwrite current search path</h3>
  112. Overwrite current search path
  113. <div class="code"><pre>
  114. g.mapsets mapset=user1,PERMANENT operation=set
  115. </pre></div>
  116. <h3>Using shortcuts for search path</h3>
  117. The current mapset can be defined by a shortcut &quot;.&quot; (dot)
  118. <div class="code"><pre>
  119. g.mapsets mapset=.,PERMANENT operation=set
  120. </pre></div>
  121. <i>Note:</i> The current mapset will be always included in the search
  122. path on the first position even if you change its position or omit the
  123. current mapset from the <b>mapset</b> option.
  124. <div class="code"><pre>
  125. g.mapsets -p
  126. Accessible mapsets:
  127. user1 PERMANENT
  128. </pre></div>
  129. <h2>SEE ALSO</h2>
  130. <em>
  131. <a href="g.access.html">g.access</a>,
  132. <a href="g.copy.html">g.copy</a>,
  133. <a href="g.gisenv.html">g.gisenv</a>,
  134. <a href="g.list.html">g.list</a>,
  135. <a href="g.mapset.html">g.mapset</a>
  136. </em>
  137. <h2>AUTHORS</h2>
  138. Michael Shapiro, U.S.Army Construction Engineering Research Laboratory<br>
  139. Greg Koerper, ManTech Environmental Technology, Inc.<br>
  140. Updated to GRASS 7 by Martin Landa, Czech Technical University in Prague, Czech Republic