Enum CommonCRS.Vertical

java.lang.Object
java.lang.Enum<CommonCRS.Vertical>
org.apache.sis.referencing.CommonCRS.Vertical
All Implemented Interfaces:
Serializable, Comparable<CommonCRS.Vertical>, java.lang.constant.Constable
Enclosing class:
CommonCRS

public static enum CommonCRS.Vertical extends Enum<CommonCRS.Vertical>
Frequently-used vertical CRS and datum that are guaranteed to be available in SIS. Methods in this enumeration are shortcuts for object definitions in the EPSG database. If there is no EPSG database available, or if the query failed, or if there is no EPSG definition for an object, then Vertical fallback on hard-coded values. Consequently, those methods never return null.

Referencing objects are cached after creation. Invoking the same method on the same Vertical instance twice will return the same IdentifiedObject instance, unless the internal cache has been cleared (e.g. the application is running in a container environment and some modules have been installed or uninstalled).

Example: the following code fetches a vertical Coordinate Reference System for heights above the Mean Sea Level (MSL):

Below is an alphabetical list of object names available in this enumeration:
Geodetic objects accessible by enumeration constants
Name or alias Object type Enumeration value
Barometric altitude CRS, Datum BAROMETRIC
Mean Sea Level Datum MEAN_SEA_LEVEL
Mean Sea Level depth CRS DEPTH
Mean Sea Level height CRS MEAN_SEA_LEVEL
NAVD88 height CRS NAVD88
North American Vertical Datum 1988 Datum NAVD88
Other surface CRS, Datum OTHER_SURFACE
Note: We do not provide a GEOIDAL value because its definition depends on the realization epoch. For example, EGM84, EGM96 and EGM2008 are applications of three different geoid models on the WGS 84 ellipsoid. The MEAN_SEA_LEVEL value can be used instead as an approximation of geoidal heights.
Since:
0.4
Version:
1.3
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Height measured by atmospheric pressure in hectopascals (hPa).
    Depth measured below the Mean Sea Level (MSL) in metres.
    Height measured along the normal to the ellipsoid used in the definition of horizontal datum.
    Height measured above the Mean Sea Level (MSL) in metres.
    North American Vertical Datum 1988 height.
    Height measured above other kind of surface, for example a geological feature.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.opengis.referencing.IdentifiedObject
    The cached object.
    (package private) final short
    The EPSG code for the CRS or the resource keys, depending on isEPSG value.
    (package private) final short
    The EPSG code for the datum or the resource keys, depending on isEPSG value.
    (package private) final boolean
    true if crs and datum are EPSG codes, or false if they are resource keys for the name as one of the Vocabulary.Keys constants.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Vertical(boolean isEPSG, short crs, short datum)
    Creates a new enumeration value of the given name.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) final void
    Invoked by when the cache needs to be cleared after a classpath change.
    org.opengis.referencing.crs.VerticalCRS
    crs()
    Returns the coordinate reference system associated to this vertical object.
    private static org.opengis.referencing.crs.VerticalCRS
    crs(org.opengis.referencing.IdentifiedObject object)
    Returns the vertical CRS associated to the given object, or null if none.
    private org.opengis.referencing.cs.VerticalCS
    cs()
    Creates the coordinate system associated to this vertical object.
    org.opengis.referencing.datum.VerticalDatum
    Returns the datum associated to this vertical object.
    private static org.opengis.referencing.datum.VerticalDatum
    datum(org.opengis.referencing.IdentifiedObject object)
    Returns the datum associated to the given object, or null if none.
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • BAROMETRIC

      public static final CommonCRS.Vertical BAROMETRIC
      Height measured by atmospheric pressure in hectopascals (hPa). Hectopascals are the units of measurement used by the worldwide meteorological community. The datum is not specific to any location or epoch.
      See Also:
      • VerticalDatumType.BAROMETRIC
    • MEAN_SEA_LEVEL

      public static final CommonCRS.Vertical MEAN_SEA_LEVEL
      Height measured above the Mean Sea Level (MSL) in metres. Can be used as an approximation of geoidal heights (height measured above an equipotential surface), except that MSL are not specific to any location or epoch.
      Mean Sea Level properties
      CRS identifiers: EPSG:5714
      Name or abbreviation: Mean Sea Level (MSL) height
      Direction: AxisDirection.UP
      Unit: Units.METRE
      See Also:
      • VerticalDatumType.GEOIDAL
    • DEPTH

      public static final CommonCRS.Vertical DEPTH
      Depth measured below the Mean Sea Level (MSL) in metres.
      Depth properties
      CRS identifiers: EPSG:5715
      Name or abbreviation: Mean Sea Level depth (MSL) depth
      Direction: AxisDirection.DOWN
      Unit: Units.METRE
      See Also:
      • VerticalDatumType.GEOIDAL
    • ELLIPSOIDAL

      public static final CommonCRS.Vertical ELLIPSOIDAL
      Height measured along the normal to the ellipsoid used in the definition of horizontal datum. The unit of measurement is metres.

      Ellipsoidal height is not part of ISO 19111 international standard. Such vertical CRS is usually not recommended since ellipsoidal heights make little sense without their (latitude, longitude) locations. The ISO specification defines instead three-dimensional GeographicCRS for that reason. Users are encouraged to avoid this orphan ellipsoidal height as much as possible.

    • OTHER_SURFACE

      public static final CommonCRS.Vertical OTHER_SURFACE
      Height measured above other kind of surface, for example a geological feature. The unit of measurement is metres.
      See Also:
      • VerticalDatumType.OTHER_SURFACE
  • Field Details

    • isEPSG

      final boolean isEPSG
      true if crs and datum are EPSG codes, or false if they are resource keys for the name as one of the Vocabulary.Keys constants.
    • crs

      final short crs
      The EPSG code for the CRS or the resource keys, depending on isEPSG value.
    • datum

      final short datum
      The EPSG code for the datum or the resource keys, depending on isEPSG value.
    • cached

      private transient volatile org.opengis.referencing.IdentifiedObject cached
      The cached object. This is initially null, then set to various kinds of objects depending on which method has been invoked. The kind of object stored in this field may change during the application execution.
  • Constructor Details

    • Vertical

      private Vertical(boolean isEPSG, short crs, short datum)
      Creates a new enumeration value of the given name.
      Note: This constructor does not expect VerticalDatumType constant in order to avoid too early class initialization. In particular, we do not want early dependency to the SIS-specific VerticalDatumTypes.ELLIPSOIDAL constant.
  • Method Details

    • values

      public static CommonCRS.Vertical[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CommonCRS.Vertical valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • clear

      final void clear()
      Invoked by when the cache needs to be cleared after a classpath change.
    • crs

      public org.opengis.referencing.crs.VerticalCRS crs()
      Returns the coordinate reference system associated to this vertical object. The following table summarizes the CRS known to this class, together with an enumeration value that can be used for fetching that CRS:
      Commonly used vertical CRS
      Name or alias Enum EPSG
      Barometric altitude BAROMETRIC
      Mean Sea Level depth DEPTH 5715
      Mean Sea Level height MEAN_SEA_LEVEL 5714
      Other surface OTHER_SURFACE
      Returns:
      the CRS associated to this enum.
      See Also:
    • cs

      private org.opengis.referencing.cs.VerticalCS cs()
      Creates the coordinate system associated to this vertical object. This is used only for CRS not identified by an EPSG code. This method does not cache the coordinate system.
    • datum

      public org.opengis.referencing.datum.VerticalDatum datum()
      Returns the datum associated to this vertical object. The following table summarizes the datum known to this class, together with an enumeration value that can be used for fetching that datum:
      Commonly used vertical datum
      Name or alias Enum EPSG
      Barometric altitude BAROMETRIC
      Mean Sea Level MEAN_SEA_LEVEL 5100
      Other surface OTHER_SURFACE
      Returns:
      the datum associated to this enum.
      See Also:
    • crs

      private static org.opengis.referencing.crs.VerticalCRS crs(org.opengis.referencing.IdentifiedObject object)
      Returns the vertical CRS associated to the given object, or null if none.
    • datum

      private static org.opengis.referencing.datum.VerticalDatum datum(org.opengis.referencing.IdentifiedObject object)
      Returns the datum associated to the given object, or null if none.