Opened 19 years ago

Closed 16 years ago

#910 closed defect (fixed)

ESRI ASCII GRIDS: Error reading last line

Reported by: haerta@… Owned by: Mateusz Łoskot
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: AAIGrid
Cc: warmerdam

Description (last modified by Mateusz Łoskot)

When reading ACII Grid files with ncols 1201/nrows 1201 I get the following errors:

gdalinfo -mm <gridname.grd>:

ERROR 3: Token too long at scanline 1200.
ERROR 1: IReadBlock failed at X offset 0, Y offset 1200

I found out that these errors are reported if the last line of values is not ended with a new line (carriage return/line feed?)

After pressing return key after the last line the file can be read as expected.

It seems that only GDAL has problems with these files.

Change History (6)

comment:1 by warmerdam, 17 years ago

Description: modified (diff)
Milestone: 1.5.0
Priority: highnormal

Mateusz,

I'd appreciate your checking this, and fixing if it still exists. I think it is sufficient to address this in trunk.

comment:2 by warmerdam, 17 years ago

Cc: warmerdam added
Owner: changed from warmerdam to Mateusz Łoskot

comment:3 by Mateusz Łoskot, 17 years ago

Description: modified (diff)
Keywords: AAIGrid added

comment:4 by Mateusz Łoskot, 16 years ago

Status: newassigned

comment:5 by Mateusz Łoskot, 16 years ago

I could not reproduce this problem with GDAL from SVN trunk.

I tested it wiht byte.tif.grd file from the autotest package. Last line in this file does not end with LF and/or CR and gdalinfo reports correct results.

I assume this bug has been fixed and closing the ticket.

comment:6 by Mateusz Łoskot, 16 years ago

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