Class VerticalDatumTypes
java.lang.Object
org.apache.sis.internal.referencing.VerticalDatumTypes
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescriptionstatic final org.opengis.referencing.datum.VerticalDatumTypeA 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.VerticalDatumTypeA vertical datum for orthometric heights that are measured along the plumb line. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(org.opengis.util.CodeList<?> code) Returnstrueif the name of the given code is the prefix of a word in the datum name.codename()Returnsnullfor disabling the creation of new code list elements.static org.opengis.referencing.datum.VerticalDatumTypefromLegacy(int code) Returns the vertical datum type from a legacy code.static org.opengis.referencing.datum.VerticalDatumTypeguess(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 inttoLegacy(org.opengis.referencing.datum.VerticalDatumType type) Returns the legacy code for the datum type, or 0 if unknown.
-
Field Details
-
ELLIPSOIDAL
public static final org.opengis.referencing.datum.VerticalDatumType ELLIPSOIDALA 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 ORTHOMETRICA 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
nullif 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, ornullif 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, ornullif unknown.aliases- the aliases of the datum for which to guess a type, ornullif unknown.axis- the vertical axis for which to guess a type, ornullif unknown.- Returns:
- a datum type, or
VerticalDatumType.OTHER_SURFACEif none can be guessed.
-
accept
public boolean accept(org.opengis.util.CodeList<?> code) Returnstrueif 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:
acceptin interfaceorg.opengis.util.CodeList.Filter- Parameters:
code- the code to test.- Returns:
trueif the code matches the criterion.
-
codename
Returnsnullfor disabling the creation of new code list elements. This method is public as an implementation side-effect and should be ignored.- Specified by:
codenamein interfaceorg.opengis.util.CodeList.Filter- Returns:
null.
-