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

Markus Metz markus.metz.giswork at gmail.com
Sat Jun 16 11:05:22 PDT 2018


On Sat, Jun 16, 2018 at 6:38 PM, jratike80 <
jukka.rahkonen at maanmittauslaitos.fi> wrote:
>
> Markus Metz-3 wrote
> > My workaround is to use GRASS r.external to get correct raster band
> > statistics.
>
> Hi,
>
> Wouldn't it be good to have an option in GDAL to force it to re-compute
> statistics? After all, statistics is just metadata and they can be all
wrong
> if you have touched the image with a third-party software.

That would be helpful.

Regarding gdalinfo,
 - gdalinfo would report what it does right now (includes any STATISTICS_*
metadata items)
 - gdalinfo -stats would compute raster band stats using all grid cells,
ignoring any STATISTICS_* metadata items
 - gdalinfo -approx-stats would compute raster band stats using a sample of
all grid cells, ignoring any STATISTICS_* metadata items

Markus
>
> -Jukka Rahkonen-
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20180616/9fbab58a/attachment.html>


More information about the gdal-dev mailing list