Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#6633 closed defect (fixed)

Unable to open certain AIG rasters with GDAL 2.1

Reported by: lpinner Owned by: warmerdam
Priority: normal Milestone: 2.1.2
Component: GDAL_Raster Version: 2.1.1
Severity: normal Keywords:
Cc:

Description (last modified by lpinner)

I'm unable to open certain ArcInfo binary (AIG) rasters with GDAL 2.1. They open in GDAL 1.11.

I've tried on Windows 7 with Tamas' GISInternal 2.1.0 and 1.11.4 release builds and Windows 7 & Linux (Ubuntu 16.04) with Conda (conda-forge) 2.1.1 and 1.11.4 builds

gdalinfo output from 1.11.4 & 2.1.1

$ gdalinfo --version
GDAL 2.1.1, released 2016/07/07

$ gdalinfo se54\woody72
ERROR 4: `se54\woody72' not recognized as a supported file format.

gdalinfo failed - unable to open 'se54\woody72'.


$ gdalinfo --version
GDAL 1.11.4, released 2016/01/25

$ gdalinfo se54\woody72
Driver: AIG/Arc/Info Binary Grid
Files: se54\woody72
       se54\woody72\dblbnd.adf
       se54\woody72\hdr.adf
       se54\woody72\metadata.xml
       se54\woody72\prj.adf
       se54\woody72\sta.adf
       se54\woody72\vat.adf
       se54\woody72\w001001.adf
       se54\woody72\w001001x.adf
Size is 24000, 16000
Coordinate System is:
GEOGCS["GDA94",
    DATUM["Geocentric_Datum_of_Australia_1994",
        SPHEROID["GRS 1980",6378137,298.257222101,
            AUTHORITY["EPSG","7019"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6283"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4283"]]
Origin = (138.000000000000000,-16.000000000000000)
Pixel Size = (0.000250000000000,-0.000250000000000)
Corner Coordinates:
Upper Left  ( 138.0000000, -16.0000000) (138d 0' 0.00"E, 16d 0' 0.00"S)
Lower Left  ( 138.0000000, -20.0000000) (138d 0' 0.00"E, 20d 0' 0.00"S)
Upper Right ( 144.0000000, -16.0000000) (144d 0' 0.00"E, 16d 0' 0.00"S)
Lower Right ( 144.0000000, -20.0000000) (144d 0' 0.00"E, 20d 0' 0.00"S)
Center      ( 141.0000000, -18.0000000) (141d 0' 0.00"E, 18d 0' 0.00"S)
Band 1 Block=256x16 Type=Byte, ColorInterp=Undefined
  Min=0.000 Max=0.000
  NoData Value=255
<GDALRasterAttributeTable>
  <FieldDefn index="0">
    <Name>VALUE</Name>
    <Type>0</Type>
    <Usage>5</Usage>
  </FieldDefn>
  <FieldDefn index="1">
    <Name>COUNT</Name>
    <Type>0</Type>
    <Usage>1</Usage>
  </FieldDefn>
  <Row index="0">
    <F>0</F>
    <F>351349453</F>
  </Row>
  <Row index="1">
    <F>1</F>
    <F>833169</F>
  </Row>
  <Row index="2">
    <F>2</F>
    <F>31817378</F>
  </Row>
</GDALRasterAttributeTable>

Attachments (2)

test.2.zip (5.1 KB ) - added by lpinner 8 years ago.
Test AIG raster
test.zip (5.1 KB ) - added by lpinner 8 years ago.
Test AIG raster

Download all attachments as: .zip

Change History (9)

comment:1 by Even Rouault, 8 years ago

Resolution: fixed
Status: newclosed

In 35240:

AIGRID: fix 2.1.0 regression when reading statistics (.sta) file with only 3 values, and fix <2.1 behaviour to read them in LSB order (fixes #6633)

comment:2 by Even Rouault, 8 years ago

In 35241:

AIGRID: fix 2.1.0 regression when reading statistics (.sta) file with only 3 values, and fix <2.1 behaviour to read them in LSB order (fixes #6633)

comment:3 by Even Rouault, 8 years ago

This dataset is "interesting". Could we made it available at http://download.osgeo.org/gdal/data/aig/ with the license terms of http://download.osgeo.org/gdal/data/COPYING ?

comment:4 by Even Rouault, 8 years ago

Milestone: 2.1.2

by lpinner, 8 years ago

Attachment: test.2.zip added

Test AIG raster

by lpinner, 8 years ago

Attachment: test.zip added

Test AIG raster

comment:5 by lpinner, 8 years ago

Description: modified (diff)

Even, I've attached a smaller AIG raster that demonstrates the same issue. It is freely redistributable.

Ignore extra attachment, they're both the same file - I forgot to tick the 'Replace existing attachment of the same name' when uploading a replacement for a larger test raster.

comment:6 by Kurt Schwehr, 8 years ago

r35251 should fix Coverity CID 1362010: Use after free of pszHDRFilename

comment:7 by Even Rouault, 8 years ago

In 35254:

AIGRID: add test file for 24 bytes sta.adf files (fixes #6633)

Note: See TracTickets for help on using tickets.