logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

g.mapset - Changes/reports current mapset.

Author

       Radim Blazek

Description

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.

Examples

Printthenameofthecurrentmapset
       To print the name of the current mapset, use the -p command as shown below:
       g.mapset -p

   Listavailablemapsets
       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."

   Changethecurrentmapset
       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."

   Createanewmapset
       To create a new mapset, use the -c tag as shown below:
       g.mapset -c mapset=new project=nc_spm_08_grass7

Keywords

       general, settings

Name

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

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

See Also

g.gisenv,g.mapsets

Source Code

       Available at: g.mapset source code (history)

       Accessed: Friday Apr 04 01:18:54 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

GRASS 8.4.1                                                                                     g.mapset(1grass)

Synopsis

g.mapsetg.mapset--helpg.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

       --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)
           Name of mapset where to switch

       project=name
           Project (location) name
           Project name (not path to project)

       dbase=path
           GRASS GIS database directory
           Default: path to the current GRASS GIS database

See Also