Class VerticalDatumTypes

java.lang.Object
org.apache.sis.internal.referencing.VerticalDatumTypes
All Implemented Interfaces:
org.opengis.util.CodeList.Filter

public final class VerticalDatumTypes extends Object implements org.opengis.util.CodeList.Filter
Extensions to the standard set of VerticalDatumType. Those constants are not in public API because they were intentionally omitted from ISO 19111, and the ISO experts said that they should really not be public.

This class implements CodeList.Filter for opportunist reasons. This implementation convenience may change in any future SIS version.

Since:
0.4
Version:
0.7
Author:
Martin Desruisseaux (IRD, Geomatys)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.opengis.referencing.datum.VerticalDatumType
    A vertical datum for ellipsoidal heights that are measured along the normal to the ellipsoid used in the definition of horizontal datum.
    static final org.opengis.referencing.datum.VerticalDatumType
    A vertical datum for orthometric heights that are measured along the plumb line.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(org.opengis.util.CodeList<?> code)
    Returns true if the name of the given code is the prefix of a word in the datum name.
    Returns null for disabling the creation of new code list elements.
    static org.opengis.referencing.datum.VerticalDatumType
    fromLegacy(int code)
    Returns the vertical datum type from a legacy code.
    static org.opengis.referencing.datum.VerticalDatumType
    guess(String name, Collection<? extends org.opengis.util.GenericName> aliases, org.opengis.referencing.cs.CoordinateSystemAxis axis)
    Guesses the type of a datum from its name, aliases or a given vertical axis.
    static int
    toLegacy(org.opengis.referencing.datum.VerticalDatumType type)
    Returns the legacy code for the datum type, or 0 if unknown.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ELLIPSOIDAL

      public static final org.opengis.referencing.datum.VerticalDatumType ELLIPSOIDAL
      A vertical datum for ellipsoidal heights that are measured along the normal to the ellipsoid used in the definition of horizontal datum.

      Identifier: CS_DatumType.CS_VD_Ellipsoidal

    • ORTHOMETRIC

      public static final org.opengis.referencing.datum.VerticalDatumType ORTHOMETRIC
      A vertical datum for orthometric heights that are measured along the plumb line.

      Identifier: CS_DatumType.CS_VD_Orthometric

  • Method Details

    • fromLegacy

      public static org.opengis.referencing.datum.VerticalDatumType fromLegacy(int code)
      Returns the vertical datum type from a legacy code. The legacy codes were defined in OGC 01-009 (Coordinate Transformation Services), which also defined the version 1 of Well Known Text format (WKT 1). This method is used for WKT 1 parsing.
      Parameters:
      code - the legacy vertical datum code.
      Returns:
      the vertical datum type, or null if the code is unrecognized.
    • toLegacy

      public static int toLegacy(org.opengis.referencing.datum.VerticalDatumType type)
      Returns the legacy code for the datum type, or 0 if unknown. This method is used for WKT 1 formatting.
      Parameters:
      type - the vertical datum type, or null if unknown.
      Returns:
      the legacy code for the given datum type, or 0 if unknown.
    • guess

      public static org.opengis.referencing.datum.VerticalDatumType guess(String name, Collection<? extends org.opengis.util.GenericName> aliases, org.opengis.referencing.cs.CoordinateSystemAxis axis)
      Guesses the type of a datum from its name, aliases or a given vertical axis. This is sometimes needed after XML unmarshalling or WKT parsing, since GML 3.2 and ISO 19162 do not contain any attribute for the datum type.

      This method uses heuristic rules and may be changed in any future SIS version. If the type cannot be determined, defaults to VerticalDatumType.OTHER_SURFACE.

      Parameters:
      name - the name of the datum for which to guess a type, or null if unknown.
      aliases - the aliases of the datum for which to guess a type, or null if unknown.
      axis - the vertical axis for which to guess a type, or null if unknown.
      Returns:
      a datum type, or VerticalDatumType.OTHER_SURFACE if none can be guessed.
    • accept

      public boolean accept(org.opengis.util.CodeList<?> code)
      Returns true if the name of the given code is the prefix of a word in the datum name. We do not test the characters following the prefix because the word may be incomplete (e.g. "geoid" versus "geoidal").

      This method is public as an implementation side-effect and should be ignored.

      Specified by:
      accept in interface org.opengis.util.CodeList.Filter
      Parameters:
      code - the code to test.
      Returns:
      true if the code matches the criterion.
    • codename

      public String codename()
      Returns null for disabling the creation of new code list elements. This method is public as an implementation side-effect and should be ignored.
      Specified by:
      codename in interface org.opengis.util.CodeList.Filter
      Returns:
      null.