Opened 7 years ago

Closed 8 months 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
Cc:

Description

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 Changed 7 years ago by warmerdam

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 Changed 7 years ago by rblazek

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

comment:4 Changed 8 months ago by Even Rouault

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 https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.