Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#5159 closed defect (fixed)

gdalinfo -hist reports negative counts

Reported by: peifer Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: Utilities Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

I used gdalinfo -hist on a byte-type GeoTIFF with 65000 x 46000 pixel.

The count for value 0 is: -1652904589.

The correct count is actually 2642062707 (as given by GRASS r.stats). This looks pretty much like an integer overflow.

Change History (5)

comment:1 by Even Rouault, 11 years ago

Yes, and the annoying thing is that it is an API bug. The histogram array is of type int...

I've added a section about that in http://trac.osgeo.org/gdal/wiki/GDAL20Changes

comment:2 by peifer, 11 years ago

Thanks for taking care. So in the meantime we'll just wait for GDAL version 2, correct?

comment:3 by Even Rouault, 11 years ago

Yes, provided that this gets incorporated in GDAL 2.0 ...

comment:4 by Even Rouault, 9 years ago

Milestone: 2.0
Resolution: fixed
Status: newclosed

Implemented in r28899

comment:5 by Even Rouault, 9 years ago

Milestone: 2.02.0.0

Milestone renamed

Note: See TracTickets for help on using tickets.