In a previous article we discussed how to display a symbology appropriate to S57 files. In this article we did not discuss how to display the values of bathimetric soundings for two reasons: the first because the soundings themselves have no symbology. They are represented by labels, not symbols. The second because they require special treatment to be displayed.
The S57 sounding layer
The soundings are contained in the SOUNDG layer.
But once the attribute table is opened, there is no attribute that looks like the value of a sounding.
The information to find them is at the level of the layer type:
This layer is not a geographic xy layer but an xyz layer. It is the Z of the geometry that contains the value of the sounding and not an attribute of the attribute table.
To be able to use it as a sounding point label, you must create an attribute and recover the Z value of the geometry.
But before doing so, another point must be made: SOUNDG is a multipoint type layer. If we want to recover the value of all points and not just the first point of the multipoints, we need to transform the layer into a simple geometry type.
From multipointZ to pointZ
To change the geometry type, we use the « De morceaux multiples à morceaux uniques »treatment of the “Vector Geometry” toolbox.
On this new PointZ layer we can now retrieve the sounding values.
Retrieving Sounding Values
We open the attribute table and the field calculator:
We define a new integer field and assign it the z($geometry)/10 expression that retrieves the Z value of the geometry. The division by 10 is necessary because the S57 sounding values are not in meters but in decimetres.
We then have an attribute with sounding values that can be used to generate labels on the chart.
Thank you for this