[gdal-dev] gdalinfo -mm also report n (number of grid cells that are not nodata)

Markus Metz markus.metz.giswork at gmail.com
Wed Jun 13 13:14:07 PDT 2018


Many raster bands contain nodata, therefore it would be helpful if the
number of non-nodata grid cells could be reported by gdalinfo in some way.

The number of non-nodata grid cells is not available through
GDALGetRasterStatistics() / GDALRasterBand::GetStatistics(), probably
because approximations can be stored as raster band statistics, and the
number of non-nodata grid cells is unknown in case of approximations.

Therefore I suggest to report the number of non-nodata grid cells only if
all grid cells are evaluated, i.e. with

*gdalinfo -mm* Force computation of the actual min/max values for each band
in the dataset.

The number of non-nodata grid cells would be a small piece of quite useful
information to quickly evaluate the usefulness of a raster band.

Asking for the possibility to enhance a bit the output of gdalinfo,

Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180613/5217eb4d/attachment.html>


More information about the gdal-dev mailing list