gdal icon indicating copy to clipboard operation
gdal copied to clipboard

Straight line edge geometry is not updated in S57 ENC

Open kirill-steor opened this issue 3 years ago • 1 comments

Expected behavior and actual behavior.

According to S-57 standard (8.4.3.3 Coordinate control field):

In the case of inserting one or more coordinates into a target record representing a straight line (i.e. an edge which only references its connecting nodes, see clause 5.1.4.4), an update record must not contain a SGCC field and the coordinate fields of the update record must be added to the target record without further modification.

But in the method ApplyRecordUpdate() coordinates are updated only when SGCC field is present in the update record.

When loading update which modifies straight line edge by adding additional coordinates, those coordinates are not added, so the edge stays straight, resulting in incorrect object geometry.

Steps to reproduce the problem.

Load any S-57 cell with update containing vector record with RUIN = 3 (modify) and without SGCC field. Unfortunately, I didn't find any such cell in S-64 test dataset

Operating system

Windows 10

GDAL version and provenance

the 3.4.0 version from conda-forge

kirill-steor avatar Feb 14 '22 13:02 kirill-steor

@kirill-steor Can you perhaps provide a pull request with the fix ? Or private access to a dataset that exhibits the issue ?

rouault avatar Feb 15 '22 16:02 rouault