g.mapset(1grass)

g.mapset1grass

Changes/reports current mapset. optionally create new mapset or list available mapsets in given project (location).

Usage

g.mapset

g.mapset --help

g.mapset [-clp] mapset=name [project=name] [dbase=path] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Keywords

general, settings

Overview

g.mapset changes the current working mapset, project (formerly known as location), or GISDBASE (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.

Notes

By default, the shell continues to use the history for the old mapset. 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

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

Source code

Available at: g.mapset source code (history)

Accessed: Monday Feb 24 17:50:29 2025

Main index | General index | Topics index | Keywords index | Graphical index | Full index

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual

Releases

10 releases since Debian 4.0 (Etch); the text changed 9 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8
  6. 9
  7. 10
  8. 11
  9. 12
  10. 13

Author

Radim Blazek

From grass-doc 8.4.1-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.