Ticket #1640 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Remove 500 char limit on HFA metadata reads and allow updates

Reported by: gillins Assigned to: warmerdam
Priority: normal Milestone: 1.4.2
Component: GDAL_Raster Version: 1.4.1
Severity: normal Keywords: HFA
Cc:

Description

The attached proposed patch resolves 2 issues with the HFA metadata:

1. You cannot read more than 500 characters of data. However, since the metadata is written to a GDAL specific node and GDAL sets the maxNumChars field we can safely rely on this field to tell us how many characters to read.

2. When updating the HFA file and overwriting metadata, duplicate nodes get created. This crashes Imagine. The patch checks for their existance before creating new ones.

Attachments

hfaopen.cpp.patch (5.9 kB) - added by gillins on 05/15/07 18:46:09.
proposed patch

Change History

05/15/07 18:46:09 changed by gillins

  • attachment hfaopen.cpp.patch added.

proposed patch

05/16/07 13:03:24 changed by warmerdam

  • keywords set to HFA.
  • status changed from new to closed.
  • resolution set to fixed.

sues confirmed.

Patch applied in trunk (r11542) with some adjustments for code style, and simplification.

Test script (autotest/gdrivers/hfa.py) extended with a couple metadata related checks to regression test this change.

Patch merged into 1.4 and 1.4-esri branches.

Thanks Sam!