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 <[email protected]> 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
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/grass-dev
_______________________________________________
grass-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-dev