[GRASS5] Re: mapset changing script

Hamish hamish_nospam at yahoo.com
Sun Jun 6 02:55:43 EDT 2004

> I was messing around with doing a location/mapset changing script 
> yesterday, but didn't get real far before I had to do something else. 
> I'd be interested in seeing/using yours if you'd be willing to let me.

see attached. Should be compatible with 5.3 and the latest 5.7.
(I don't remember if 'g.gisenv set="MAPSET=foo"' worked with early 5.0)

> What do you think about putting it into the script exchange?

sure. still useful for 5.3 now I guess.
!It doesn't check to see if you are the owner of the new mapset.

> I have written g.mapset which does that (check mapset permission,
> clean temporary files, erase monitors, reset variables). 

Having two modules named g.mapset and g.mapsets is confusing..
g.mapset could as well be called g.location or g.gisdbase for what it
does. I don't have a better name though.

Is it ok to swap the order of the G_define_option()s in the code so it
is ordered:   g.mapset mapset=a location=b gisdbase=c  ?

That way you don't need to type mapset= every time, as it will be the
most common change. Just 'g.mapset foo'.

Flag for not erasing displays?  I'll often have 20 mapsets within a
location specifying individual study sites, each with common map names.
I then jump between them & d.redraw to quickly have a look at what is
next door.

 * COPYRIGHT:    (C) 2001 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: g.nm
Type: application/octet-stream
Size: 1082 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20040606/c93154fa/g.obj

More information about the grass-dev mailing list