Opened 14 years ago

Closed 14 years ago

#3541 closed defect (fixed)

Unable to open certain ArcInfo Binary Grids

Reported by: lpinner Owned by: warmerdam
Priority: normal Milestone: 1.7.2
Component: GDAL_Raster Version: 1.7.1
Severity: normal Keywords: aigrid
Cc:

Description

I've come across quite a few ArcInfo binary grids on our system that GDAL can't read. They're variations on the newer ArcGIS 9+ Desktop grid format with multiple tile files. These variations don't have any w*.adf data or index files, just z*.adf files, could this be the issue?

The grid can be downloaded from http://www.environment.gov.au/download/testgrid.zip (~10Mb). It will there for 5 days before the webserver auto deletes it.

C:\WorkSpace>dir /b testgrid
dblbnd.adf
hdr.adf
log
prj.adf
sta.adf
vat.adf
z001011.adf
z001011x.adf
z001012.adf
z001012x.adf
z001013.adf
z001013x.adf
z001014.adf
z001014x.adf
z001015.adf
z001015x.adf

C:\WorkSpace>gdalinfo testgrid
ERROR 4: `testgrid' not recognised as a supported file format.

gdalinfo failed - unable to open 'testgrid'.


C:\WorkSpace>arc
...
Arc: describe testgrid
                          Description of Grid testgrid

Cell Size =               0.000         Data Type:                   Integer
Number of Rows    =       87270           Number of Values =               2
Number of Columns =       92670           Attribute Data (bytes) =        40

           BOUNDARY                                STATISTICS

Xmin =                  138.585         Minimum Value =                1.000
Xmax =                  152.486         Maximum Value =                2.000
Ymin =                  -37.677         Mean          =                1.042
Ymax =                  -24.586         Standard Deviation =           0.200

                          COORDINATE SYSTEM DESCRIPTION

Projection           GEOGRAPHIC
Datum                     GDA94
Units                        DD             Spheroid                GRS1980
Parameters:

Change History (1)

comment:1 by warmerdam, 14 years ago

Keywords: aigrid added
Milestone: 1.7.2
Resolution: fixed
Status: newclosed

The core problem with this dataset seems to be that it lacks the top tile files (w001001.adf). The driver already supports the "z" files. I have modified the AIGDataset::Open() to succeed if it finds any of the tile files.

Furthermore, I modified AIGAccessTile(), and the block reading functions to only issue a warning when a tile is not found (for the first access), and to fill in the result imagery with nodata values. With these changes I can gdal_translate the whole raster to geotiff and examine it and see the hydrology network.

The changes are in trunk (r19496) and 1.7 (r19497) in time for GDAL 1.7.2.

Thanks for the report!

Note: See TracTickets for help on using tickets.