[GRASS-dev] Additional switch(es) for <g.mapsets>?
Nikos Alexandris
nik at nikosalexandris.net
Sun Feb 17 09:57:16 PST 2013
[..]
Nikos:
> > > Or, add an optional switch "-s" or
Hamish:
> fwiw there is already a "-s" switch to launch the selection GUI,
This is cool & handy :-)
> > > Currently, in bash-scripting G7, I try first to remove
> > > access to all mapsets but the current (of course) as
> > > follows:
> > > # one-liner!
> > > g.mapsets mapset=$(g.mapsets -p sep=newline | \
> > > grep -v `g.mapset -p` | tr "\n" ",") operation=remove
> why not just like:
> g.mapsets mapset=nikos,PERMANENT op=set>
> ?
> op=set is a replacing action.
yes, why not? :-)
Martin wrote:
> > If I understood well, you want something like
> > g.mapsets set=<current_mapset>
> > ?
> note that in many places in grass we have:
> g.mlist mapset=.
> to reference the current mapset. That doesn't seem to work in
> g.mapsets yet, but it would be pretty easy to add. Then you
> could have in your script a generic:
>
> g.mapsets mapset=.,PERMANENT op=set
> if you want to avoid the `eval g.gisenv` step to get the current
> $MAPSET name to feed into g.mapsets's mapset= option.
Yes, much easier with "mapset=." :-)
> ps- should failure to include PERMANENT in a new search path
> produce a warning G_message()? (hushed by --quiet)
you mean in case of "mapset=WhatEverMapset,PERMANENT op=set", right?
Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20130217/bb043da6/attachment.pgp>
More information about the grass-dev
mailing list