Display and configure electronic navigational charts per ENC specification.

Use case
The S-52 standard defines how Electronic Navigational Chart (ENC) content should be displayed to ensure that data is presented consistently across every charting system. S-52 defines several display options, including variations on symbology to ensure that charts are readable both at night and in direct sunlight.
How to use the sample
When opened, the sample displays an electronic navigational chart. Tap on the map to select ENC features and view the feature’s acronyms and descriptions shown in a callout. Tap “Display Settings” and use the options to adjust some of the ENC mariner display settings, such as the colors and symbology.
How it works
- To display ENC content:
- On
ENCEnvironmentSettings.shared, setresourceURLto the local hydrography data directory andsencDataURLto a temporary directory. - Create an
ENCExchangeSetusing URLs to the local ENC exchange set files and load it. - Make an
ENCCellfor each of theENCExchangeSet.datasetsand then make anENCLayerfrom each cell. - Add the layers to the map using
Map.addOperationalLayers(_:)and create aMapViewto display the map.
- On
- To select ENC features:
- Use
onSingleTapGesture(perform:)on the map view to get the screen point from the tapped location. - Create a
MapViewReaderto get theMapViewProxyand use it to identify nearby features to the tapped location withidentifyLayers(screenPoint:tolerance:returnPopupsOnly:maximumResultsPerLayer:). - From the resulting
IdentifyLayerResult, get theENCLayerfromlayerContentand theENCFeature(s) fromgeoElements. - Use
ENCLayer.select(_:)to select the ENC feature(s).
- Use
- To set ENC display settings:
- Get the
ENCDisplaySettingsinstance fromENCEnvironmentSettings.shared.displaySettings. - Use
marinerSettings,textGroupVisibilitySettings, andviewingGroupSettingsto access the settings instances and set their properties. - Reset the display settings using
resetToDefaults()on the settings instances.
- Get the
Relevant API
- ENCCell
- ENCDataset
- ENCDisplaySettings
- ENCEnvironmentSettings
- ENCExchangeSet
- ENCLayer
- ENCMarinerSettings
- ENCTextGroupVisibilitySettings
- ENCViewingGroupSettings
- IdentifyLayerResult
Offline data
This sample downloads the ENC Exchange Set without updates item from ArcGIS Online automatically.
The latest Hydrography Data can be downloaded from the Esri Developer downloads. The S57DataDictionary.xml file is contained there.
Additional information
Read more about displaying and deploying electronic navigational charts on Esri Developer.
Tags
ENC, hydrography, identify, IHO, layers, maritime, nautical chart, S-52, S-57, select, settings, symbology