<div dir="ltr"><br><br>On Fri, Oct 19, 2018 at 4:04 PM Moritz Lennert <<a href="mailto:mlennert@club.worldonline.be">mlennert@club.worldonline.be</a>> wrote:<br>><br>> On 19/10/18 15:48, Michel Wortmann wrote:<br>> > Hi Moritz,<br>> > How about this:<br>> ><br>> > info = grass.parse_command('r.univar', map='raster_xyz', flags='g')<br>> > print(int(info['n']), int(info['null_cells']))<br>><br>> Thanks !<br>><br>> Yes, this is one option. I was wondering if there was any faster option<br>> than actually having to read the map in the whole region with r.univar,<br><div>> but probably there isn't.</div><div><br></div><div>You need a module that reads the whole map, and the fastest way to get the number of non-null values is most probably r.univar -g, as mentioned by Michel Wortmann.</div><div><br></div><div>Markus M</div><div><br></div>><br>> Moritz<br>> _______________________________________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev">https://lists.osgeo.org/mailman/listinfo/grass-dev</a></div>