Class EncEnvironmentSettings


  • public final class EncEnvironmentSettings
    extends java.lang.Object
    Represents settings for ENC (Electronic Navigational Chart) that are applied to all instances of EncCell and EncLayer.

    A valid resource path setResourcePath(String) and a valid SENC (System Electronic Navigational Chart) data path setSencDataPath(String) are necessary to load EncCell and EncLayer.

    Since:
    100.2.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static EncEnvironmentSettings.DisplaySettings getDisplaySettings()
      Gets the ENC display settings, which allows selection of mariner, viewing group, and text group visibility settings.
      static java.lang.String getResourcePath()
      Gets the path to the directory containing the ENC resource files.
      static java.lang.String getSencDataPath()
      Gets the path to the directory where the SENC files are written.
      static void setResourcePath​(java.lang.String path)
      Sets the path to the directory containing the ENC resource files.
      static void setSencDataPath​(java.lang.String path)
      Sets the path to the directory where the SENC (System Electronic Navigational Chart) files will be written.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EncEnvironmentSettings

        public EncEnvironmentSettings()
    • Method Detail

      • getDisplaySettings

        public static EncEnvironmentSettings.DisplaySettings getDisplaySettings()
        Gets the ENC display settings, which allows selection of mariner, viewing group, and text group visibility settings.
        Returns:
        the ENC display settings
        Since:
        100.2.0
      • setResourcePath

        public static void setResourcePath​(java.lang.String path)
        Sets the path to the directory containing the ENC resource files.
        Parameters:
        path - path to an existing directory containing the ENC resource files. If the path does not exist, then the EncCell and EncLayer will fail to load.
        Throws:
        java.lang.IllegalArgumentException - if path is null or empty
        Since:
        100.2.0
      • getResourcePath

        public static java.lang.String getResourcePath()
        Gets the path to the directory containing the ENC resource files.
        Returns:
        the path to the directory containing the ENC resource files
        Since:
        100.2.0
      • setSencDataPath

        public static void setSencDataPath​(java.lang.String path)
        Sets the path to the directory where the SENC (System Electronic Navigational Chart) files will be written.

        SENC data will automatically get created the first time a EncCell is loaded. It is up to the developer to manage this data between sessions - if a map is reloaded between sessions, make sure the SENC data path is properly set to reuse the already generated SENC data.

        ENC data is converted into a SENC format for optimal chart display.

        Subsequent loads of an ENC cell will read from the SENC files directly.

        Parameters:
        path - path to an existing directory where the SENC files will be written. If the path does not exist, then the EncCell and EncLayer won't load
        Throws:
        java.lang.IllegalArgumentException - if path is null or empty
        Since:
        100.2.0
      • getSencDataPath

        public static java.lang.String getSencDataPath()
        Gets the path to the directory where the SENC files are written.
        Returns:
        the path to the directory where the SENC files are written
        Since:
        100.2.0