Opened 8 years ago

Closed 7 years ago

#3969 closed defect (fixed)

Unable to update projection in specific HFA datasets

Reported by: rprinceley Owned by: warmerdam
Priority: normal Milestone: 1.8.1
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: HFA
Cc: gaopeng, ajain


HFASetProParameters fails to update projection entry in files similar to the one attached.


Attachments (2)

testworld.img (65.1 KB) - added by rprinceley 8 years ago.
testworld2.img (65.6 KB) - added by rprinceley 7 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by rprinceley

Attachment: testworld.img added

comment:1 Changed 8 years ago by rprinceley

Cc: ajain added

comment:2 Changed 8 years ago by warmerdam

Keywords: HFA added
Status: newassigned

comment:3 Changed 8 years ago by warmerdam

Resolution: fixed
Status: assignedclosed

HFASetProParameters() had a similar issue with needing the entry reinitialized to zeros as we encountered with the RRDNamesList recently. I have applied the change to HFASetProParameters and HFASetDatum() and now the operation seems to work properly.

Change applied in trunk (r21757) and 1.8 branch (r21758).

comment:4 Changed 8 years ago by rprinceley

Resolution: fixed
Status: closedreopened

Some projection strings sill don't work - updating from world mercator to ESRI Sphere_Aitoff fails (if you clear projection and reopen dataset, this works).


comment:5 Changed 8 years ago by warmerdam

Resolution: fixed
Status: reopenedclosed

In trunk Aitoff is supported properly *but* in this case writing the PE string equivelent was not triggered and the code did not clear the old PE String definition. So the change was to ensure that if we don't write a PE string that we do clear the old PE string. This is done in trunk (r21763) and 1.8 branch (r21764).

Note that 1.8 branch does not support Aitoff projection. This was recently incorporated in trunk as part of merging 1.6-esri changes and rectifying the projections support with definitions from Erdas. We should likely consider migrating those changes into 1.8 branch once we are confident in them.

So the Aitoff definition will sort-of work in 1.8 but only because it is written as a PE string.

comment:6 Changed 8 years ago by rprinceley

Thanks, that is all we need for now in 1.8.

I have started merging some of the projection code from trunk into our 1.8 branch, will get back after testing.

Changed 7 years ago by rprinceley

Attachment: testworld2.img added

comment:7 Changed 7 years ago by rprinceley

Resolution: fixed
Status: closedreopened

Found another case - for testworld2.img, HFAEntry::MakeData?() returns NULL in HFASetProParameters().

SR specified:


comment:8 Changed 7 years ago by warmerdam

Resolution: fixed
Status: reopenedclosed

Problem reproduced. It turns out of MakeData?() was called with a smaller value it would just return pabyData but if the data had not already been loaded it was NULL. The fix is to call LoadData?() in this case to populate the buffer. Fixed in trunk (r22537), 1.8 (r22538) and 1.8-esri (r22539).

Note: See TracTickets for help on using tickets.