Cruisers & Sailing Forums (
-   OpenCPN (
-   -   ENC Data in Word Processor (

clark05 26-10-2015 02:13

ENC Data in Word Processor
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. Does anyone have any information on this? Or if there is some sort of word processor available for download that can decrypt the ENC file?


bcn 26-10-2015 02:39

Re: ENC Data in Word Processor
If your are referring to ENCs in the context of standard chart material you can start here:

For performance reasons a chart plotter program - such as OpenCPN - will convert the ENCs into an internal format - SENC in IHO speak.

clark05 26-10-2015 02:45

Re: ENC Data in Word Processor
Thanks for the reply bcn,

I'm trying to find the text data of the ENC so I can extract that to Excel or other program to insert into a database.

bcn 26-10-2015 02:56

Re: ENC Data in Word Processor
If you are trying to update or extract information from an (offical) ENC you will have to identify the corresponding chart objects with their attributes and search for them in the ENC.

There is no table Soundings with /lat/lon/depth
--> S-57 standard

dwoodall 26-10-2015 04:23

Re: ENC Data in Word Processor
IHO S-57 / ENC - Object and Attribute Catalogue

Look at DEPARE and DEPCNT. There may be others but I am not that familiar with the S-57 spec. I don't think what you want to do is going to be particularly easy.

Another route is look at the Open Sea Map work. They use a JOSM structure to hold the depth data. At least if you go that way, you are working on current technology. Navionics has a similar initiative but I am concerned they will restrict the data to Navionic users are make it a pay per use thing.


SamsonovAnton 30-10-2015 10:24

Re: ENC Data in Word Processor

Originally Posted by bcn (Post 1946504)
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 (Post 1946485)
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.

clark05 31-10-2015 17:37

Re: ENC Data in Word Processor
Wow, definitely more work than I expected. I'm not trying to edit the ENC, just trying to extract the depth information. I work on an oil tanker and I'm looking for an automated way to calculate UKC for each leg of my voyage without having to visually go through the ECDIS.

Thanks for the info I'll try to continue digging into this and see what I come up with.

Hakan 01-11-2015 09:35

Re: ENC Data in Word Processor
I wouldn't be surprised, impressed though, if someone, say Sean, should be able to "follow" a route on vector charts and read depth info in a certain distance beside the line and print that in a table. Next is to interest the programmer for this task. :)

rgleason 03-11-2015 03:06

Re: ENC Data in Word Processor
Submarines must do this all the time, but it is probably not open source. I think somewhere this program already exists is it open source?

All times are GMT -7. The time now is 13:42.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2019, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.