[GRASS-dev] Additional switch(es) for <g.mapsets>?

Nikos Alexandris nik at nikosalexandris.net
Fri Feb 15 23:38:42 PST 2013

Hi devs!

Would you consider adding an optional "-r" (as "remove") switch to the 
<g.mapsets> module?

Or, add an optional switch "-s" or "-x" (as "select-ive/-ed" or as 
"exclusive") which will add the specified mapsets (parameter "mapset=") and 
remove the rest (but the current, of course)?


I work with Landsat imagery, many tiles, imported in individual Mapsets (per 
Landsat scene) and I often want to run/loop over many Mapsets.  I require to 
ensure that, while loopen over Mapsets (=individual Landsat scenes) and, 
working on each of the bands that pertain to a Landsat scene, raster 
processing modules wont touch any bands out of the current Mapset. Even avoid 
WARNING mesages that a raster map A has been found elsewhere, but the raster 
map B in Mapset B will be used.

A use case is, for example, that I need to selectively use  i.landsat.toar  on 
many Mapsets (that is, on many Landsat scenes) with the default 
method(=uncorrected) and produce At-Sensor-Reflectances while performing 
conversion to Top-of-Atmosphere Radiance with  i.landsat.toar's  "-r" switch.

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

Then, I selectively (and manually) add mapsets of interest.

Thank you, 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/20130216/f29db3a3/attachment-0001.pgp>

More information about the grass-dev mailing list