Opened 16 years ago

Closed 16 years ago

#2598 closed defect (fixed)

[PATCH] GDAL ignores the HeaderOffset attribute in .ers files

Reported by: agf Owned by: warmerdam
Priority: normal Milestone: 1.5.3
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: ers
Cc:

Description

GDAL presently ignores the HeaderOffset field in ers files and therefore interprets a binary header as data.

This patch implements the solution described on the mailing list: http://lists.osgeo.org/pipermail/gdal-dev/2008-July/017587.html

This seems to work, though I've not done much testing (see test.cc).

An example .ers file using the HeaderOffset attribute is attached (dem and dem.ers: this is a digital elevation model of an island, ocean is represented as -9999).

Patch is against release 1.5.2 of GDAL, but should apply to trunk too.

Attachments (4)

ers-headerOffset.patch (1.6 KB ) - added by agf 16 years ago.
dem.ers (783 bytes ) - added by agf 16 years ago.
dem (4.7 KB ) - added by agf 16 years ago.
test.cc (1.3 KB ) - added by agf 16 years ago.

Download all attachments as: .zip

Change History (5)

by agf, 16 years ago

Attachment: ers-headerOffset.patch added

by agf, 16 years ago

Attachment: dem.ers added

by agf, 16 years ago

Attachment: dem added

by agf, 16 years ago

Attachment: test.cc added

comment:1 by warmerdam, 16 years ago

Component: defaultGDAL_Raster
Keywords: ers added
Milestone: 1.5.3
Resolution: fixed
Status: newclosed

Slightly modified patch applied in trunk (r15466) and 1.5 branch (r15468). The test suite was also updated to test this case (r15467).

Note: See TracTickets for help on using tickets.