Originally Posted by bcn
There is no table Soundings with lat/lon/depth in S-57 standard.
Perhaps you meant quite the opposite — spot soundings are stored right that way (an array of isolated 3D-points).
Originally Posted by clark05
I'm trying to develop a excel file that will auto update soundings for specific regions and I'm trying to understand how the ENC data is constructed / read.
If you just need to extract data from ENC, and do not want to do full-fledged parsing, you may choose to support “canonical format” only and make some shortcuts:
- if only spot soundings are of interest, then you basically need to parse isolated-node vector records (VI) which have 3D-coordinate field (SG3D);
- for areas of ranged depths, you will need to parse feature records (FE) as well, looking for those of type DEPARE, as dwoodall mentioned, — then enumerate all items in their feature-to-spatial pointer field (FSPT) to find all corresponding edge vector records (VE) that are linked with connected-node records (VC), which together constitute the area's boundary (or boundaries, if there are multiple); you then need to parse the feature record's attributes DRVAL1 and DRVAL2 from attribute field (ATTV) to get the depth range for that area;
- for lines of constant depth (whether open or closed), you will need to do similar work for DEPCNT feature objects and VALDCO attribute.
As you see, getting the data from ENC is easy… or difficult — depending on your attitude.
However, updating the data in ENC with your own values is another story:
- if you are just updating spot soundings (i. e. modifying Z-coordinate of existing points), then a simple binary overwrite may be enough, as long as you can match the source format;
- if you need to add or remove points, or replace a text attribute value with a different length, you will also need to perform full recalculation of DDF field directory;
- alternatively, it may be easier to rewrite the entire file, because then you will be in total control of the format, but that also requires taking care of everything — if you want your updated chart to be compatible with existing software.
But why would you want to modify official ENCs at all? They could not be called “ENCs” after that, as this name implies they originate from a legitimate source.