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 πŸ“

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