Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#4209 closed defect (fixed)

Small AI ASCII grid file files are not recognised as a supported file format

Reported by: peifer Owned by: warmerdam
Priority: low Milestone: 1.9.0
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords: AAIGRID
Cc:

Description (last modified by peifer)

According to aaigriddataset.cpp, line 426, small files with less than 100 bytes do not look like an AI ASCII grid file. This results in into ERROR 4 when trying to read the following legitimate, but only 62 byte large file:

$ cat test.asc
ncols     1
nrows     1
xllcorner 0
yllcorner 0
cellsize  1
0

$ gdalinfo test.asc
ERROR 4: `test.asc' not recognised as a supported file format.

gdalinfo failed - unable to open 'test.asc'.

Change History (4)

comment:1 by peifer, 11 years ago

Description: modified (diff)

comment:2 by warmerdam, 11 years ago

Keywords: AAIGRID added
Milestone: 1.9.0
Priority: normallow
Status: newassigned

I'll take this.

comment:3 by warmerdam, 11 years ago

Resolution: fixed
Status: assignedclosed

Corrected in trunk (r22982). I don't really think this is important enough to bother backporting to 1.8.

in reply to:  3 comment:4 by peifer, 11 years ago

Replying to warmerdam:

Corrected in trunk (r22982). I don't really think this is important enough to bother backporting to 1.8.

Thanks for the fix which works as expected.

Note: See TracTickets for help on using tickets.