[GRASS-dev] quickest way to test whether a raster contains any non-null values in the current computational region ?
Michel Wortmann
wortmann at pik-potsdam.de
Fri Oct 19 06:48:04 PDT 2018
Hi Moritz,
How about this:
info = grass.parse_command('r.univar', map='raster_xyz', flags='g')
print(int(info['n']), int(info['null_cells']))
Michel
> On 19 Oct 2018, at 15:36, Moritz Lennert <mlennert at club.worldonline.be> wrote:
>
> Hi all,
>
> What would be the quickest way to test whether a raster contains any non-null values in the current computational region ?
>
> And the correlary: what would be the quickest way to test whether a raster contains any null values in the current computational region ?
>
> This will be applied in Python, so if there are any special Python functions, these are welcome, too.
>
> Moritz
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20181019/2945bae1/attachment.html>
More information about the grass-dev
mailing list