Open KlasOstergren-SMA opened 9 months ago
The problem occurs when the sounding has the same depth as DRVAL1, but DRVAL2 (and the VALDCO of the DEPCNT) has the value of the next deeper contour level used in the dataset.
Given the above statement and the UOC guidance on isolated shoals, the correction for the red "Wrong encoding" example should be: 10m SOUNDG DRVAL1 = 10 DRVAL2 = 15 VALDCO = 15
The problem here is that value of 10 for VALDCO is incorrect and it should be 15 (i.e. the same as the DRVAL2). Alternatively, DRVAL2 could be amended to 10. I would not add a check for SOUNDG when the problem can be identified as an incorrect VALDCO or DRVAL2.
Check 1771 already identifies this incorrect DEPCNT.
We could also add a new check:
For each DEPARE feature object which is an isolated shallow area AND is COINCIDENT with a DEPCNT where the DRVAL2 of the DEPARE is not Equal to the VALDCO of the DEPCNT.
This is upon the UOC, s. 5.4.3. The relevant clauses are in bold.
- If the depth area is only bounded by a one depth contour and the deepest depth is shown by a depth contour, and the shallowest depth is shown by a sounding (an isolated shoal area): • DRVAL1 should take the value of the data set depth contour immediately shallower than the value of the sounding or H. However if the shallowest sounding within the area is considered to be the least depth of the shoal, DRVAL1 may be populated with the value of this sounding. • DRVAL2 should take the value of the depth contour. NOTE: In the case where the shallowest depth in the area is equal to the bounding depth contour, both DRVAL1 and DRVAL2 may be populated with the value of the depth contour.
We have identified a case where incorrect DRVAL values (related to a sounding value) are not detected by any S-58 check. This is an effect of the changes that we made to check 1768 to allow isolated shoals with the same DRVAL1 and DRVAL2 values in ed.7. In the worst case, this can lead to an incorrect DRVAL1 value not being detected, affecting the safety contour.
In ed.6.1, all soundings with a depth value that was less than or equal to the DRVAL1 value were identified. In ed.7, soundings with a depth value that are equal to DRVAL1 in isolated shoals, are no longer detected.
This is ok for soundings that are within a DEPARE where DRVAL1 and DRVAL2 are identical to the sounding. In this case, the VALDCO of the DEPCNT will also be the same. The problem occurs when the sounding has the same depth as DRVAL1, but DRVAL2 (and the VALDCO of the DEPCNT) has the value of the next deeper contour level used in the dataset. The figure below shows four different cases where this is shown in red. In S-58 ed.6.1, this was detected by check 1768 but now it is not detected at all.
To fix this, a new check (1768c?) needs to be added. I have made a first draft and would appreciate your comments.
For each SOUNDG feature object where the depth value is equal to the DRVAL1 of the DEPARE feature object it is WITHIN AND DRVAL1 is not equal to DRVAL2 AND the depth value for the SOUNDG feature object is Equal to a VALDCO value on a DEPCNT feature object found in the ENC (if the DEPARE is an isolated shallow area)
A 000 file containing the data for the figure above is attached. S58_check_1768.zip