g.mapset(1)
π g.mapset β the GRASS GIS user's manual, but make it cute π
okay bestie, welcome to g.mapset(1), straight out of the GRASS GIS User's Manual. this is the little glow-up tool that changes or reports your current mapset, and it can even make a brand new mapset or list all the mapsets in a given project (location) for you. no cap. β¨
πΈ KEYWORDS πΈ
general, settings β yes, it's giving "general settings icon behavior". iconic.
π SYNOPSIS π
g.mapset
g.mapset --help
g.mapset [-clp] mapset=name [project=name] [dbase=path]
[--overwrite] [--help] [--verbose] [--quiet] [--ui]
β¨ Flags β¨
-cβ Create mapset if it doesn't exist π£-lβ List available mapsets and exit π-pβ Print current mapset and exit π¨οΈ--overwriteβ Allow output files to overwrite existing files π³ (yes, it will actually clobber them)--helpβ Print usage summary π«Ά--verboseβ Verbose module output π£οΈ--quietβ Quiet module output π€«--uiβ Force launching GUI dialog πͺ
π Parameters π
mapset=name[required] β Name of mapset (default: current search path). It's the name of the mapset where you want to switch to, bestie. π¦project=nameβ Project (location) name. Note: that's the project name, not the path to the project. π«πdbase=pathβ GRASS GIS database directory. Default: path to the current GRASS GIS database. ποΈ
π DESCRIPTION π
g.mapset changes the current working mapset, project (formerly known as location), or GISDBASE (that's the directory with one or more projects in it). main character energy, honestly. π
With g.mapset, the shell history (i.e. the .bash_history file of the initial project) will be used to record the command history. π§ β¨
π NOTES π
By default, the shell continues to use the history for the old mapset. lowkey confusing, i know. To change this behaviour, the history can be switched to record in the new mapset's history file as follows:
# bash example
history -w
history -r /"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
HISTFILE=/"$GISDBASE/$LOCATION/$MAPSET"/.bash_history
copy that exactly, bestie, don't freestyle the quotes. π
π 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."
π 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."
π£ 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.gisenv, g.mapsets
π AUTHOR π
Radim Blazek
π SOURCE CODE π
Available at: g.mapset source code (history)
Accessed: Saturday Jan 17 05:40:39 2026
Main index | General index | Topics index | Keywords index | Graphical index | Full index
okay that's the whole page, and yes, every last detail made it in β nothing skipped, nothing invented, periodt. π
and for the cute sign-off: this whole thing is running on GRASS 8.4.2, manual page g.mapset(1), copyright Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual. the source code access date was Saturday Jan 17 05:40:39 2026, and the footer says GRASS 8.4.2 β g.mapset(1). slay, go switch some mapsets. π¦πβ¨
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· 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