[GRASS-user] Get non-NULL cells over multiple rasters
Johannes Radinger
JRadinger at gmx.at
Thu Mar 1 10:04:45 EST 2012
Hi,
-------- Original-Nachricht --------
> Datum: Thu, 01 Mar 2012 15:28:38 +0100
> Von: Moritz Lennert <mlennert at club.worldonline.be>
> An: Johannes Radinger <JRadinger at gmx.at>
> CC: grass-user at lists.osgeo.org
> Betreff: Re: [GRASS-user] Get non-NULL cells over multiple rasters
> Moritz Lennert wrote:
> > Johannes Radinger wrote:
> >> 2) and I tried it in a python script with:
> >> grass.run_command("r.series",
> >> input = "'g.mlist pattern='rast_*|crast_*|Treene_raster' sep=,'",
> >> overwrite=True,
> >> flags = "n",
> >> output = "Treene_tmp_mask",
> >> method = "count")
> >
> >
> > If you want to work in a python script, you have to first run
> > read_command(g.mlist), put the result in a comma-seperated string which
> > you then feed into r.series. There are possibly other ways that I don't
> > know about...
>
> Something like this:
>
> maps=grass.read_command('g.mlist',
> pattern='rast_*|crast_*|Treene_raster', type='rast').splitlines()
>
> grass.run_command("r.series", input=maps, out="Treene_tmp_mask",
> method="count", flags="n", overwrite=True)
sorry a read this mail to late.... i think splitlines work (at least with
the example I sent before)
Thank you very much
best regards,
Johannes
>
> Moritz
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
--
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
More information about the grass-user
mailing list