Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5289 closed defect (fixed)

ignore null in GetHistogram, update to ticket 4750 for GDT_Byte case

Reported by: nflood Owned by: warmerdam
Priority: normal Milestone: 1.11.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

Ticket http://trac.osgeo.org/gdal/ticket/4750 by gillins was a welcome fix in consistency between ComputeStatistics? and GetHistogram?. However, it missed a special case in GetHistogram?, for GDT_Byte datatype, when exactly 256 bins are used. This is, of course, a very common case, hence there is a special section of code for it, but the earlier patch missed this (quite understandably) and only fixed the more general case. Attached is a patch which brings the special case into line with the rest. This modification has been tested in gdal-1.10.1, and appears to behave, but the attached patch is against the current trunk (r26588). I have checked this modification with gillins, and he agrees.

Attachments (1)

gdalrasterband.cpp.hist_ignore_null_GByte_case.patch (615 bytes) - added by nflood 4 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 4 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r26590 "GDALRasterBand::GetHistogram?(): ignore nodata values in the GDT_Byte special case (#5289, patch by nflood, complementary of #4750)"

comment:2 Changed 4 years ago by Even Rouault

Milestone: 2.01.11.0
Note: See TracTickets for help on using tickets.