[Gdal-dev] gdal tool for generating statistics on geotiff?

Frank Warmerdam warmerdam at pobox.com
Mon Nov 6 11:34:43 EST 2006


John Cartwright wrote:
> Hello All,
> 
> is there a gdal tool that will allow me to generate statistics (min, 
> max, etc.) on the values in a geotiff?

John,

The -stats option to gdalinfo should report stuff like the following:

Band 1 Block=512x16 Type=Byte, ColorInterp=Gray
   Minimum=0.000, Maximum=255.000, Mean=104.135, StdDev=58.308
   Metadata:
     STATISTICS_MINIMUM=0
     STATISTICS_MAXIMUM=255
     STATISTICS_MEAN=104.13526916504
     STATISTICS_STDDEV=58.308455229198

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list