Opened 12 years ago

Closed 5 years ago

#4857 closed defect (wontfix)

GDALGetRasterStatistics() ignores bApproxOK=false bForce=false

Reported by: rblazek Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: statistics


If GDALGetRasterStatistics() is called with bApproxOK=false and bForce=false and exact statistics (from all raster pixels) are not available/cached, it should return CE_Warning. Instead, it is giving estimated (from sample) cached statistics and it returns CE_None.

Thus it is not possible to test only if exact statistics are cached to avoid GDALComputeRasterStatistics() if possible.

Change History (4)

comment:1 by warmerdam, 12 years ago

Keywords: statistics added
Frank writes:
> I gather the problem is that GDAL cannot tell whether saved statistics in
> metadata are exact or not, right?

Radim writes:
> It should be possible, at least .aux.html has <Approximate>1</Approximate>.

comment:2 by rblazek, 12 years ago

Sorry, I was wrong, <Approximate>1</Approximate> is in <Histograms><HistItem> not in <Metadata>.

comment:4 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to if it is not already reported there.

Note: See TracTickets for help on using tickets.