g.mapset(1grass)
β¨ g.mapset β¨
okay bestie, gather round, because g.mapset β from the GRASS User's Manual β is literally the vibe check for your mapset π
π NAME π
g.mapset changes or reports the current mapset, no cap. And optionally? It can create a new mapset or list the available mapsets in a given project (location). Like, it does the most, and we love that for it.
πΈ KEYWORDS πΈ
general, settings, project
π¦ SYNOPSIS π¦
g.mapset
g.mapset --help
g.mapset [-clp] mapset=name [project=name] [dbase=path] format=name
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
π Flags
-cβ create that mapset if it doesn't exist yet, it's giving builder energy-lβ list available mapsets and dip out (exit)-pβ print the current mapset and exit, periodt--overwriteβ lets output files overwrite existing files, spicy but allowed--helpβ prints the usage summary, for when you're lost bestie--verboseβ verbose module output, she's chatty--quietβ quiet module output, she's mysterious--uiβ force launching the GUI dialog, main character GUI moment
π Parameters
mapset=name[required] β name of the mapset (default: current search path). This is the name of the mapset where you want to switch. do not skip this one πproject=nameβ project (location) name. It's the project name, NOT the path to the project, iykyk.dbase=pathβ the GRASS database directory. Default: path to the current GRASS database.format=name[required] β output format. Options:plain,json. Default:plain.plain: plain text output, classic, timelessjson: JSON (JavaScript Object Notation), for the structured-data girlies
π DESCRIPTION π
g.mapset changes the current working mapset, project (formerly known as location), or GISDBASE (which is the directory with one or more projects).
With g.mapset, the shell history (i.e. .bash_history file of the initial project) will be used to record the command history. so she's keeping receipts π«Ά
π NOTES π
By default, the shell continues to use the history for the old mapset. Like, it's loyal to the old one, lowkey.
To change this behaviour, the history can be switched to record in the new mapset's history file like this:
# bash example
history -w
history -r /"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
HISTFILE=/"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
β¨ EXAMPLES β¨
π Print the name of the current mapset
To print the name of the current mapset, use the -p command as shown below:
g.mapset -p
π List available mapsets
To list available mapsets, use the -l command as shown below:
g.mapset -l
This should list all the mapsets, such as: "landsat new PERMANENT user1." slay, look at all of them π
π Change the current mapset
To change the current mapset to "user1" use the following command:
g.mapset mapset=user1 project=nc_spm_08_grass7
You should receive the following message: "Mapset switched. Your shell continues to use the history for the old mapset." iconic behaviour honestly.
π Create a new mapset
To create a new mapset, use the -c tag as shown below:
g.mapset -c mapset=new project=nc_spm_08_grass7
π SEE ALSO π
g.gisenvg.mapsets
π§ AUTHOR π§
Radim Blazek
π₯ SOURCE CODE π₯
Available at: g.mapset source code (history)
Latest change: Monday Oct 13 16:40:43 2025 in commit: ae1f0dd12744249f59f72f6779bd9612fc17a00e
Main index | General index | Topics index | Keywords index | Graphical index | Full index
and that's the whole page bestie, every flag, every parameter, every path, every example β all of it, untouched, just vibing now π
okay so final sign-off: this was the GRASS 8.5.0 Reference Manual, Β© 2003-2026 GRASS Development Team, and the man page is g.mapset(1grass) from GRASS 8.5.0. bye pookie, go switch your mapset π¦π
β¨
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms