Class EncLayer

  • All Implemented Interfaces:
    LayerContent, Loadable

    public final class EncLayer
    extends Layer
    A layer that displays ENC data.

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

    Functional characteristics

    ENC layer supports identify and selection, but does not support query or time.

    Performance characteristics

    ENC layers differ from other layer types in that ENC content is cached in an internal collection of SENC files. When an ENC layer is displayed, only the content in the SENC files is referenced. SENC files are produced when an ENC cell is read for the first time and updated as update sets are applied. You can set the path to the SENC storage directory with EncEnvironmentSettings.setSencDataPath(String). SENC files are in a binary format that is not intended to be shared between platforms or versions of ArcGIS Runtime.

    All ENC layers will render based on EncEnvironmentSettings.DisplaySettings.

    Example for working with a ENC Layer

     EncCell encCell = new EncCell("file-path-of-ENC-cell");
     EncLayer encLayer = new EncLayer(encCell);
     encLayer.addDoneLoadingListener(new Runnable() {
       public void run() {
         if (encLayer.getLoadStatus() == LoadStatus.LOADED) {
           // ENC layer has loaded
    The layer is loaded when displayed in a MapView; if using the layer without a MapView, call the Layer.loadAsync() method. Use the layer done loading event to determine when the layer is ready, and check the load status before using the layer.
    See Also:
    EncEnvironmentSettings, Layer
    • Constructor Detail

      • EncLayer

        public EncLayer​(EncCell encCell)
        Creates an EncLayer based on an EncCell.
        encCell - an ENC cell
        java.lang.IllegalArgumentException - if encCell is null
    • Method Detail

      • getCell

        public EncCell getCell()
        Gets the ENC cell this layer was initialized with.
        the ENC cell this layer was initialized with
      • selectFeature

        public void selectFeature​(EncFeature encFeature)
        Selects an ENC feature.

        Only a single ENC feature can be selected at a time. Selecting a feature using this method will unselect any previously selected feature.

        An ENC feature can be rendered as multiple objects. Each object that makes up this feature will be selected.

        encFeature - ENC feature to select
        java.lang.IllegalArgumentException - if encFeature is null
      • clearSelection

        public void clearSelection()
        Clears / Unselects a previously selected ENC feature, if any.