Opened 16 years ago

Closed 14 years ago

#2511 closed defect (fixed)

Gdal doesn't calculate stats correctly if it is negative number

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.6.3
Component: GDAL_Raster Version: 1.5.0
Severity: normal Keywords:
Cc: yanchen gaopeng

Description (last modified by warmerdam)

(Gdal doesn't calculate stats correctly if the image is GDT_Byte with PIXELTYPE=SIGNEDINT. In gcore\gdalrasterband.cpp, function ::GDALRasterBand::ComputeStatistics(…)

                switch( poBlock->GetDataType() )
                {
                  case GDT_Byte:
                    dfValue = ((GByte *) poBlock->GetDataRef())[iOffset];
                    break;

Change History (3)

comment:1 by warmerdam, 16 years ago

Description: modified (diff)
Status: newassigned

comment:2 by Even Rouault, 14 years ago

Frank, I've fixed that recently as #3151

comment:3 by Even Rouault, 14 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.