1g.mapset(1) Grass User's Manual g.mapset(1)
2
3
4
6 g.mapset - Changes/reports current mapset.
7 Optionally create new mapset or list available mapsets in given loca‐
8 tion.
9
11 general, settings
12
14 g.mapset
15 g.mapset --help
16 g.mapset [-clp] mapset=name [location=name] [dbase=path] [--over‐
17 write] [--help] [--verbose] [--quiet] [--ui]
18
19 Flags:
20 -c
21 Create mapset if it doesn’t exist
22
23 -l
24 List available mapsets and exit
25
26 -p
27 Print current mapset and exit
28
29 --overwrite
30 Allow output files to overwrite existing files
31
32 --help
33 Print usage summary
34
35 --verbose
36 Verbose module output
37
38 --quiet
39 Quiet module output
40
41 --ui
42 Force launching GUI dialog
43
44 Parameters:
45 mapset=name [required]
46 Name of mapset (default: current search path)
47 Name of mapset where to switch
48
49 location=name
50 Location name
51 Location name (not location path)
52
53 dbase=path
54 GRASS GIS database directory
55 Default: path to the current GRASS GIS database
56
58 g.mapset changes the current working MAPSET, LOCATION, or GISDBASE.
59 This is a fairly radical maneuver to run mid-session, take care when
60 running the GUI at the same time.
61
62 With g.mapset, the shell history (i.e. .bash_history file of the ini‐
63 tial location will be used to record the command history.
64
66 By default, the shell continues to use the history for the old mapset.
67 To change this behaviour the history can be switched to record in the
68 new mapset’s history file as follows:
69 # bash example
70 history -w
71 history -r /"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
72 HISTFILE=/"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
73
75 Print the name of the current mapset
76 To print the name of the current mapset, use the -p command as shown
77 below:
78 g.mapset -p
79
80 List available mapsets
81 To list available mapsets, use the -l command as shown below:
82 g.mapset -l
83 This should list all the mapsets, such as: "landsat new PERMANENT
84 user1."
85
86 Change the current mapset
87 To change the current mapset to "user1" use the following command:
88 g.mapset mapset=user1 location=nc_spm_08_grass7
89 You should receive the following message: "Mapset switched. Your shell
90 continues to use the history for the old mapset."
91
92 Create a new mapset
93 To create a new mapset, use the -c tag as shown below:
94 g.mapset -c mapset=new location=nc_spm_08_grass7
95
97 g.gisenv, g.mapsets
98
100 Radim Blazek
101
103 Available at: g.mapset source code (history)
104
105 Main index | General index | Topics index | Keywords index | Graphical
106 index | Full index
107
108 © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
109
110
111
112GRASS 7.8.2 g.mapset(1)