Opened 11 years ago

Closed 11 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 11 years ago.
dem.ers (783 bytes) - added by agf 11 years ago.
dem (4.7 KB) - added by agf 11 years ago.
test.cc (1.3 KB) - added by agf 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by agf

Attachment: ers-headerOffset.patch added

Changed 11 years ago by agf

Attachment: dem.ers added

Changed 11 years ago by agf

Attachment: dem added

Changed 11 years ago by agf

Attachment: test.cc added

comment:1 Changed 11 years ago by warmerdam

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.