[GRASS-user] i.group with patterns as name for input
Pietro
peter.zamb at gmail.com
Wed Apr 1 07:39:46 PDT 2015
On Wed, Apr 1, 2015 at 4:16 PM, umberto.minora <umberto.minora at unimi.it> wrote:
> For example: if my maps are [prova_01, prova_02, ..., prova100], I would
> like to insert them in the same group by doing something like:
>
> run_command("i.group", type="raster", input="prova_*")
>
> Any suggestion? Ah, I am using Python for grass scripting. Thanks in advance
{{{
from grass.pygrass.gis import Mapset
mset = Mapset()
run_command("i.group", input=mset.glist("raster", pattern="prova_*"))
}}}
not tested... but should work.
Pietro
More information about the grass-user
mailing list