Debian Codegraph @

general/g.mapset/g.mapset.html

raw
1 <h2>DESCRIPTION</h2>
2
3 <em>g.mapset</em> changes the current working mapset, project (formerly known
4 as location), or GISDBASE (directory with one or more projects).
5
6 <p>
7 With <em>g.mapset</em>, the shell history (i.e. <code>.bash_history</code> file
8 of the initial project will be used to record the command history.
9
10 <h2>NOTES</h2>
11
12 By default, the shell continues to use the history for the old mapset.
13 To change this behaviour the history can be switched to record in the new
14 mapset's history file as follows:
15
16 <div class="code"><pre>
17 # bash example
18 history -w
19 history -r /"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
20 HISTFILE=/"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
21 </pre></div>
22
23 <h2>EXAMPLES</h2>
24
25 <h3>Print the name of the current mapset</h3>
26
27 To print the name of the current mapset, use the <b>-p</b> command as
28 shown below:
29 <div class="code"><pre>
30 g.mapset -p
31 </pre></div>
32
33 <h3>List available mapsets</h3>
34 To list available mapsets, use the <b>-l</b> command as shown below:
35 <div class="code"><pre>
36 g.mapset -l
37 </pre></div>
38
39 This should list all the mapsets, such as: "landsat new PERMANENT user1."
40
41 <h3>Change the current mapset</h3>
42 To change the current mapset to "user1" use the following command:
43
44 <div class="code"><pre>
45 g.mapset mapset=user1 project=nc_spm_08_grass7
46 </pre></div>
47
48 You should receive the following message: "Mapset switched. Your shell
49 continues to use the history for the old mapset."
50
51 <h3>Create a new mapset</h3>
52
53 To create a new mapset, use the <b>-c</b> tag as shown below:
54 <div class="code"><pre>
55 g.mapset -c mapset=new project=nc_spm_08_grass7
56 </pre></div>
57
58 <h2>SEE ALSO</h2>
59
60 <em>
61 <a href="g.gisenv.html">g.gisenv</a>,
62 <a href="g.mapsets.html">g.mapsets</a>
63 </em>
64
65 <h2>AUTHOR</h2>
66
67 Radim Blazek