Radim,<div><br></div><div>I gather the problem is that GDAL cannot tell whether saved statistics in metadata are exact or not, right? I don't have any real plan to resolve this unfortunately. I ticket might be prudent. </div>
<div><br></div><div>Best regards,</div><div>Frank<br><br><div class="gmail_quote">On Thu, Oct 11, 2012 at 8:39 AM, Radim Blazek <span dir="ltr"><<a href="mailto:radim.blazek@gmail.com" target="_blank">radim.blazek@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">GDALGetRasterStatistics API doc:<br>
"Returns the minimum, maximum, mean and standard deviation of all<br>
pixel values in this band. If approximate statistics are sufficient,<br>
the bApproxOK flag can be set to true in which case overviews, or a<br>
subset of image tiles may be used in computing the statistics.<br>
If bForce is FALSE results will only be returned if it can be done<br>
quickly (ie. without scanning the data). If bForce is FALSE and<br>
results cannot be returned efficiently, the method will return<br>
CE_Warning but no warning will have been issued. This is a<br>
non-standard use of the CE_Warning return value to indicate "nothing<br>
done"."<br>
<br>
<br>
My understanding is that if it is called with bApproxOK=false and<br>
bForce=false and exact statistics (from all raster pixels) are not<br>
available/cached, it should return CE_Warning. Instead, it is giving<br>
estimated (from sample) cached statistics and it returns CE_None.<br>
<br>
Is it expected? If it is, how can I test if exact statistics (from all<br>
raster pixels) are available/cached (to avoid<br>
GDALComputeRasterStatistics() if not necessary). Also, the meaning of<br>
both params should be probably better described in doc.<br>
<br>
Radim<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush | Geospatial Software Developer<br><br>
</div>