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, timeless
    • json: 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 ✨

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.gisenv
  • g.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