[gdal-dev] Statistics min/max results are differents from histogram min/max results
Andrea Peri
aperi2007 at gmail.com
Wed Sep 2 23:56:12 PDT 2015
Hi Even , thx for explanations.
So its all ok.
A.
2015-09-02 20:24 GMT+02:00 Even Rouault <even.rouault at spatialys.com>:
> Le mercredi 02 septembre 2015 20:08:47, Andrea Peri a écrit :
>> Hi,
>>
>> I see the minimum and maximum retrieved using the gdalinfo -stas comand
>> are quite different from the same minimum and maximum retireved using
>> the API python function "GetDefaultHistogram" ?
>
> Andrea,
>
> The min and max values returned by GetDefaultHistogram() aren't necessarily
> the min and max values of the pixel values of the raster, but of the selected
> bounds for the buckets of the histogram.
>
> * @param pdfMin pointer to double value that will contain the lower bound of
> the histogram.
> * @param pdfMax pointer to double value that will contain the upper bound of
> the histogram.
>
> In the case of a Byte raster, those bounds are hardcoded to be -0.5 and 255.5.
> This is a speed optimization, as in the general case, for other datatypes, the
> actual min & max values from statistics will be first computed, and then the
> histogram.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
More information about the gdal-dev
mailing list