[GRASSLIST:7701] Re: g.mapset OR g.gisenv (GUI wishlist discussion)

Michael Barton michael.barton at asu.edu
Mon Jul 25 01:16:36 EDT 2005


Dave,

I'd just like to reiterate what Glynn said. G.mapset (not g.mapsets) does
exactly what I think you want to do.

It allows you to move completely between mapsets within a location, between
locations (and mapsets) within your GRASS database (i.e., the folder where
you keep GRASS locations), and between different GRASS databases (with their
own locations and mapsets).

For example, let's assume you are working in the "PERMANENT" mapset of the
"wgs84" location of your gisdbase /home/dave/grassdata

Issuing the command (or doing the same thing via the GUI)...

g.mapset mapset=PERMANENT location=nad27 gisdbase=/home/dave/grassdata2

...would now have you working in the "PERMANENT" mapset of location "nad27"
in the GRASS database /home/dave/grassdata2

The command...

g.mapset mapset=PERMANENT location=wgs84 gisdbase=/home/dave/grassdata

...would have you working back in the place (mapset - location - gisdbase)
where you started. 

You need to know the name of the database, location, and/or mapset you want
to move to. No browse buttons at the moment, but as Glynn says they could be
added to the GUI with some programming.

Nevertheless, I think this does what you want.

Note, you can also open multiple sessions of GRASS 6.1. That is, you can
start GRASS in the "wgs84" location and then start another session in the
"nad27" location.

Michael


On 7/23/05 4:55 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

> 
> Dave Sampson wrote:
> 
>> having posted a wish to be able to move between mapsets and locations
>> without closing out of GRASS I was given two options from two people
>> (ref bug#3456).
>> 
>> One was g.mapset and the other is g.gisenv. Some questions.
>> 
>> 1. What is the difference between the two
> 
> g.gisenv is a general-purpose utility for modifying GRASS parameters.
> 
> g.mapset is more specific. It can only modify the GISDBASE,
> LOCATION_NAME and MAPSET parameters; however, it does some sanity
> checking, handles locking correctly, etc.
> 
> With the addition of g.mapset, the g.gisenv approach should be
> considered deprecated.
> 
>> 2. Can a button be built in to show ALL mapsets and coresponsing
>> locations for either or both of these. This could enhance the gui
> 
> It would be possible to make the location and mapset fields into combo
> boxes.
> 
>> 3. It appears that g.mapset creates only a NEW location. How do you
>> access a created location that is not current.
> 
> If so, that's a bug. The code explicitly checks that the selected
> database, location or mapset exists.
> 
>> 4. for g.gisenv is it possible to provide options of what variables are
>> possible to change? eg dataset, mapset, location and have these
>> accesible through a button.
> 
> Not realistically; the set of GRASS variables is open-ended.
> 
> g.gisenv is a low-level tool, primarily for use by scripts, or for
> quick hacks where a more suitable tool doesn't exist.
> 
>> 5. could someone provide an example of how I might COMPLETELY move from
>> one location and mapset to a new location with a mapset of the same name.
> 
> Convenient tools for creating a new database, location or mapset are
> currently missing. At present, this can only easily be done at
> startup.

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ  85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>




More information about the grass-user mailing list