Ticket #910 (closed defect: fixed)

Opened 3 years ago

Last modified 7 months ago

ESRI ASCII GRIDS: Error reading last line

Reported by: haerta@haerta.de Assigned to: mloskot
Priority: normal Milestone: 1.5.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: AAIGrid
Cc: warmerdam

Description (Last modified by mloskot)

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

04/25/07 10:01:58 changed by warmerdam

  • priority changed from high to normal.
  • description changed.
  • milestone set to 1.5.0.

Mateusz,

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

04/25/07 10:06:33 changed by warmerdam

  • owner changed from warmerdam to mloskot.
  • cc set to warmerdam.

10/29/07 01:28:03 changed by mloskot

  • keywords set to AAIGrid.
  • description changed.

12/06/07 22:25:18 changed by mloskot

  • status changed from new to assigned.

12/06/07 22:25:24 changed by mloskot

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.

12/06/07 22:25:44 changed by mloskot

  • status changed from assigned to closed.
  • resolution set to fixed.