Display electronic navigational charts

Electronic navigational charts (ENCs) are georeferenced vector datasets for the visualization and analysis of hydrographic and maritime information. ArcGIS Runtime supports ENCs that conform to the International Hydrographic Organization (IHO) S-57 standard. Use ENCs in your ArcGIS Runtime apps to:

  • Visualize S-57 data in compliance with S-52 standards and specifications for chart content display
  • Use maritime data as an additional data source for situational awareness and decision making
  • Combine S-57 datasets with other sources of information for geospatial analysis

Get started

ENC functionality in runtime is accessed via the Esri.ArcGISRuntime.Hydrography NuGet package. The NuGet package will ensure that all binaries and resources required by runtime for ENC functionality are deployed to your application’s output folder.

Display an electronic navigational chart

ENC data is distributed as cells, or collections of cells, which are exchange sets. An exchange set is composed of a single catalog file along with dataset files (cells) for specific geographic extents. Cells can be loaded individually or as part of an exchange set.

ENC layers are constructed from ENC cells. A cell can be constructed from a dataset or from a path. When cells are distributed as part of an exchange set, always use the dataset-based constructor. Cells loaded from a path directly will not include any updates that were distributed as part of the exchange set. You can add all of the cells in an exchange set to a map by iterating through the loaded exchange set’s datasets.

To add an exchange set to your map view, create a new exchange set object and provide the file path to a catalog file (named "CATALOG.031" per the specification). If the catalog file you are processing represents updates only, then you must provide the path to the original catalog file plus the update catalog file(s). See Working with updates for more information.

Once the exchange set is loaded, iterate through the Datasets property and construct cells from each data set.

EncExchangeSet encExchangeSet = new EncExchangeSet(new string[] { @"..\Data\ENC_ROOT\CATALOG.031" });
await encExchangeSet.LoadAsync();

foreach(EncDataset encDataset in encExchangeSet.Datasets)
{
    EncLayer encLayer = new EncLayer(new EncCell(encDataset));
    MyMap.OperationalLayers.Add(encLayer);
}

Working with updates

ENC charts are often distributed as base cells (.000 files) with one or more update cells (.001, .002, etc. files). An exchange set can consist exclusively of update cells; in order to load an update exchange set, the path to the base exchange set must be provided simultaneously.

EncExchangeSet exchangeSet = new EncExchangeSet(new string[] { @"path\to\update", @"path\to\original" });

When loading an ENC cell, it is important to use the dataset-based constructor. If updates for a cell are part of an exchange set, they will only be found by the runtime when the dataset-based constructor is used. Loading the cell from a path will not load any associated updates.

Set ENC environment settings

ENC layers are displayed in accordance with the IHO S-52 standard. You can define the display properties of your ENC layers by using the static EncEnvironmentSettings class. These settings apply to all ENC layers in all maps. Settings fall under three categories: mariner settings, text group visibility settings, and viewing group settings. Text group settings control the display of labels for features, mariner settings control the symbolization and presentation of ENC features, and viewing group settings allow for quickly applying settings to logical groups of feature types.

// Enables display of seabed information for all ENC layers
EncEnvironmentSettings.Default.EncDisplaySettings.TextGroupVisibilitySettings.NatureOfSeabed = true;

Runtime’s ENC implementation works with ENC content via compiled SENC files. SENC is an acronym for System Electronic Navigational Chart. After an ENC cell has been loaded, all future loads of that cell will reference the underlying SENC file directly. You can use the SencDataPath property of the environment settings to find or set the location where SENC files are stored.

Identify and select ENC features

ENC layers support identify through the common geo view feature identification mechanism, which takes a screen point and tolerance in pixels. Identify will return a collection of IdentifyLayerResult objects, one per matching layer. For ENC layers, the results will have a GeoElements property, which is a collection of EncFeatures.

Once a feature has been identified, you can call SelectFeature on the layer that contains the feature to select it.

// Perform the identify operation
IReadOnlyList<IdentifyLayerResult> results = await MyMapView.IdentifyLayersAsync(e.Position, 5, false);

// Return if there are no results
if (results.Count < 1) { return; }

// Take action on each identified ENC feature
foreach(IdentifyLayerResult result in results)
{
    foreach(EncFeature feature in result.GeoElements)
    {
        // Get the layer associated with this set of results
        EncLayer containingLayer = (EncLayer)result.LayerContent;

        // Select the feature
        containingLayer.SelectFeature(feature);
    }
}


In this topic