id summary reporter owner description type status priority milestone component version severity resolution keywords cc 5028 S57 driver fails to apply update to lnam_refs correctly boatbeacon warmerdam "We are using the GDAL OGR S57 driver to extract data from the UKHO ENC data sets. We came across a bug with the extracted data ( a lighthouse with lights not attached) and reported it to the UKHO. They carried out a thorough investigation and narrowed it down to a bug in the OGR S-57 handling of updates. Specifically OGR S57 was applying the update correctly to remove the light objects (4 of them) and add 4 new light objects but it was failing to update the lnam_refs field of the lighthouse (a LNDMRK object) with the lnams of the new light objects. I have attached the feedback from the IC-ENC team below. I have the GB301478 data set available for reproducing the bug with, please contact me for a copy. Feedback from IC-ENC:- Base cell GB301478: Creates the LNDMARK object and sets up the master-slave association with the four LIGHTS objects you noted GB301478 update2: Creates 4 more LIGHTS objects, deletes the original slave objects then overwrites the feature-feature pointers with the new LIGHTS created in the update. The reason that you cannot find the slave objects and have 4 co-located lights is because the OGR tools are wrongly processing update 2. They are reporting the original slave objects rather than the new ones. The data below shows a summary of the actions for update 2 followed by an XML encoding of the ISO8211 of update2 where you can see the modification of the feature-feature links. {{{ R1[154b-1795] DSID DSSI R2[214b-1949] FRID Add 100/48775 LIGHTS FOID [540/620599488/5] ATTF FSPT R3[210b-2163] FRID Add 100/48776 LIGHTS FOID [540/2147483647/6] ATTF FSPT R4[210b-2373] FRID Add 100/48777 LIGHTS FOID [540/1546091932/7] ATTF FSPT R5[210b-2583] FRID Add 100/48774 LIGHTS FOID [540/2147483647/4] ATTF FSPT R6[55b-2793] FRID Del 100/2443 LIGHTS R7[55b-2848] FRID Del 100/2444 LIGHTS R8[55b-2903] FRID Del 100/2445 LIGHTS R9[55b-2958] FRID Del 100/2446 LIGHTS R10[137b-3013] FRID Mod 100/2429 LNDMRK FOID [540/2147483647/2508] FFPC Mod FFPT 100 2429 1 2 74 [LNDMRK] 2 3 540 2147483647 2508 3 1 4 1C02D88B92C00400 2 1C02C098FD240500 2 1C02023C9FA50600 2 1C029C7D275C0700 2 }}}" defect closed normal OGR_SF 1.9.2 normal fixed S57 ENC OGR LNAM_REFS