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

Even Rouault even.rouault at spatialys.com
Thu Jun 14 13:55:39 PDT 2018


> > Wanna take a crack at implementing this ?
> 
> Too many API changes required, starting with GDALGetRasterStatistics(),
> GDALComputeRasterStatistics() and all else following. There must be an
> easier solution. But thanks for your offer:-)

We don't necessary need to change the API. The function could just set the 
metadata item, and the client would read it with GDALGetMetadataItem()

> Enhancement request: set STATISTICS_APPROXIMATE=UNKNOWN if it is unknown. I
> checked with some externally provided sample data and GDAL 2.3.0 does not
> report STATISTICS_APPROXIMATE.

I didn't want to pollute statistics with STATISTICS_APPROXIMATE=NO when exact 
computation has been done. So basically you have STATISTICS_APPROXIMATE=YES or 
no STATISTICS_APPROXIMATE at all when exact computation has been done (which 
is the normal assumption)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list