org.geotools.referencing.datum
Class DefaultVerticalDatum

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.AbstractIdentifiedObject
          extended byorg.geotools.referencing.datum.AbstractDatum
              extended byorg.geotools.referencing.datum.DefaultVerticalDatum
All Implemented Interfaces:
org.opengis.referencing.datum.Datum, org.opengis.referencing.IdentifiedObject, java.io.Serializable, org.opengis.referencing.datum.VerticalDatum

public class DefaultVerticalDatum
extends AbstractDatum
implements org.opengis.referencing.datum.VerticalDatum

A textual description and/or a set of parameters identifying a particular reference level surface used as a zero-height surface. The description includes its position with respect to the Earth for any of the height types recognized by this standard. There are several types of vertical datums, and each may place constraints on the coordinate system axis with which it is combined to create a vertical CRS.

Since:
2.1
Version:
$Id: DefaultVerticalDatum.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Martin Desruisseaux
See Also:
Serialized Form

Field Summary
static DefaultVerticalDatum ELLIPSOIDAL
          Default vertical datum for ellipsoidal heights.
static DefaultVerticalDatum GEOIDAL
          Default vertical datum for geoidal heights.
 
Fields inherited from class org.geotools.referencing.AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 
Fields inherited from interface org.opengis.referencing.datum.Datum
ANCHOR_POINT_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEY, VALID_AREA_KEY
 
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
DefaultVerticalDatum(java.util.Map properties, org.opengis.referencing.datum.VerticalDatumType type)
          Constructs a vertical datum from a set of properties.
DefaultVerticalDatum(java.lang.String name, org.opengis.referencing.datum.VerticalDatumType type)
          Constructs a vertical datum from a name.
DefaultVerticalDatum(org.opengis.referencing.datum.VerticalDatum datum)
          Constructs a new datum with the same values than the specified one.
 
Method Summary
 boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
          Compare this vertical datum with the specified object for equality.
protected  java.lang.String formatWKT(Formatter formatter)
          Format the inner part of a Well Known Text (WKT) element.
 org.opengis.referencing.datum.VerticalDatumType getVerticalDatumType()
          The type of this vertical datum.
static org.opengis.referencing.datum.VerticalDatumType getVerticalDatumTypeFromLegacyCode(int code)
          Returns the vertical datum type from a legacy code.
 int hashCode()
          Returns a hash value for this vertical datum.
 
Methods inherited from class org.geotools.referencing.datum.AbstractDatum
getAnchorPoint, getRealizationEpoch, getScope, getValidArea
 
Methods inherited from class org.geotools.referencing.AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
toString, toWKT, toWKT, toWKT
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opengis.referencing.datum.Datum
getAnchorPoint, getRealizationEpoch, getScope, getValidArea
 
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Field Detail

GEOIDAL

public static final DefaultVerticalDatum GEOIDAL
Default vertical datum for geoidal heights.


ELLIPSOIDAL

public static final DefaultVerticalDatum ELLIPSOIDAL
Default vertical datum for ellipsoidal heights. Ellipsoidal heights are measured along the normal to the ellipsoid used in the definition of horizontal datum.

Constructor Detail

DefaultVerticalDatum

public DefaultVerticalDatum(java.lang.String name,
                            org.opengis.referencing.datum.VerticalDatumType type)
Constructs a vertical datum from a name.

Parameters:
name - The datum name.
type - The type of this vertical datum.

DefaultVerticalDatum

public DefaultVerticalDatum(org.opengis.referencing.datum.VerticalDatum datum)
Constructs a new datum with the same values than the specified one. This copy constructor provides a way to wrap an arbitrary implementation into a Geotools one or a user-defined one (as a subclass), usually in order to leverage some implementation-specific API. This constructor performs a shallow copy, i.e. the properties are not cloned.

Since:
2.2

DefaultVerticalDatum

public DefaultVerticalDatum(java.util.Map properties,
                            org.opengis.referencing.datum.VerticalDatumType type)
Constructs a vertical datum from a set of properties. The properties map is given unchanged to the super-class constructor.

Parameters:
properties - Set of properties. Should contains at least "name".
type - The type of this vertical datum.
Method Detail

getVerticalDatumType

public org.opengis.referencing.datum.VerticalDatumType getVerticalDatumType()
The type of this vertical datum. Default is ?geoidal?.

Specified by:
getVerticalDatumType in interface org.opengis.referencing.datum.VerticalDatum
Returns:
The type of this vertical datum.

getVerticalDatumTypeFromLegacyCode

public static org.opengis.referencing.datum.VerticalDatumType getVerticalDatumTypeFromLegacyCode(int code)
Returns the vertical datum type from a legacy code. The legacy codes were defined in Coordinate Transformation Services (OGC 01-009), which also defined the Well Known Text (WKT) format. This method is used for WKT parsing.

Parameters:
code - The legacy vertical datum code.
Returns:
The vertical datum type, or if the code is unrecognized.

equals

public boolean equals(AbstractIdentifiedObject object,
                      boolean compareMetadata)
Compare this vertical datum with the specified object for equality.

Overrides:
equals in class AbstractDatum
Parameters:
object - The object to compare to .
compareMetadata - for performing a strict comparaison, or for comparing only properties relevant to transformations.
Returns:
if both objects are equal.

hashCode

public int hashCode()
Returns a hash value for this vertical datum. Name, remarks and the like are not taken in account. In other words, two vertical datums will return the same hash value if they are equal in the sense of equals(AbstractIdentifiedObject, false).

Overrides:
hashCode in class AbstractIdentifiedObject
Returns:
The hash code value. This value doesn't need to be the same in past or future versions of this class.

formatWKT

protected java.lang.String formatWKT(Formatter formatter)
Format the inner part of a Well Known Text (WKT) element.

Overrides:
formatWKT in class AbstractDatum
Parameters:
formatter - The formatter to use.
Returns:
The WKT element name, which is "VERT_DATUM"


Copyright © GeoTools. All Rights Reserved.