Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#6886 closed defect (fixed)

AIG: regression on 32bit blocks

Reported by: Even Rouault Owned by: warmerdam
Priority: normal Milestone: 2.1.4
Component: default Version: 2.1.0
Severity: normal Keywords: aig
Cc:

Description

Reported on mailing list :

I think this is a bug, but wanted to make sure I wasn't doing something stupid before I posted it as such.

At r32878 (git 1eb605a), Even added new logic for dealing with raw 32-bit AIG blocks.  I've got an AIG raster that has a few blocks where valid data is getting set to the min Int32 value (-2147483648) when doing a gdal_translate to GeoTiff.  

  gdal_translate -of GTiff ai_bug ai_bug.tif

Note the "old" way of getting these values was providing the correct values in this case:

  panData[i] = pabyCur[0] * 256 * 256 * 256
      + pabyCur[1] * 256 * 256
      + pabyCur[2] * 256
      + pabyCur[3] + nMin;  

Note that this is only affecting selected blocks within the raster.  Other blocks seem to be just fine.

Test raster posted here:

  ftp://ftp.fsl.orst.edu/pub/gregorym/gdal/ai_bug.7z (1MB)

From my testing, <= 2.0 is OK, >= 2.1 is affected.  Tested on Windows 10 64-bit.

Change History (4)

comment:1 Changed 15 months ago by Even Rouault

Resolution: fixed
Status: assignedclosed

In 38226:

AIGRID: fix handling on raw 32-bit AIG blocks (fixes #6886)

comment:2 Changed 15 months ago by Even Rouault

In 38227:

AIGRID: fix handling on raw 32-bit AIG blocks (fixes #6886)

comment:3 Changed 15 months ago by Even Rouault

In 38228:

AIGRID: fix handling on raw 32-bit AIG blocks (fixes #6886)

comment:4 Changed 15 months ago by Even Rouault

In 38229:

aigrid.py: add test (refs #6886)

Note: See TracTickets for help on using tickets.