[GRASS5] Presence of NULL data in raster maps?

Hamish hamish_nospam at yahoo.com
Sat Jul 3 02:26:05 EDT 2004


> there seems to be missing a function which reports the presence 
> of NULL data in a raster map. This functions is needed for 
> interfacing GRASS to GDAL, especially for 8 bit data.
> At time the entire map must be scanned, right? This
> can become pretty time consuming.
> 
> Is it sufficient to test the presence of the 'null' file 
> within this potential function? A bit dirty, but otherwise the
> cellhd file needed an addition (null: true or whatever).
> 
> Suggestions (or code)?


It would be easy to add a flag to continue; the loop in r.univar(2) at
line 120 just after the n++; to quickly report a count of total cells
vs. number of null cells in a map for a compare..



Hamish




More information about the grass-dev mailing list