org.geotools.referencing.datum
Class AbstractDatum

java.lang.Object
  extended byorg.geotools.referencing.wkt.Formattable
      extended byorg.geotools.referencing.AbstractIdentifiedObject
          extended byorg.geotools.referencing.datum.AbstractDatum
All Implemented Interfaces:
org.opengis.referencing.datum.Datum, org.opengis.referencing.IdentifiedObject, java.io.Serializable
Direct Known Subclasses:
DefaultEngineeringDatum, DefaultGeodeticDatum, DefaultImageDatum, DefaultTemporalDatum, DefaultVerticalDatum

public class AbstractDatum
extends AbstractIdentifiedObject
implements org.opengis.referencing.datum.Datum

Specifies the relationship of a coordinate system to the earth, thus creating a coordinate reference system. A datum uses a parameter or set of parameters that determine the location of the origin of the coordinate reference system. Each datum subtype can be associated with only specific types of coordinate systems.

A datum can be defined as a set of real points on the earth that have coordinates. The definition of the datum may also include the temporal behavior (such as the rate of change of the orientation of the coordinate axes).

This class is conceptually abstract, even if it is technically possible to instantiate it. Typical applications should create instances of the most specific subclass with prefix instead. An exception to this rule may occurs when it is not possible to identify the exact type.

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

Field Summary
 
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
AbstractDatum(org.opengis.referencing.datum.Datum datum)
          Constructs a new datum with the same values than the specified one.
AbstractDatum(java.util.Map properties)
          Constructs a datum from a set of properties.
 
Method Summary
 boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
          Compares the specified object with this datum for equality.
protected  java.lang.String formatWKT(Formatter formatter)
          Format the inner part of a Well Known Text (WKT) element.
 org.opengis.util.InternationalString getAnchorPoint()
          Description, possibly including coordinates, of the point or points used to anchor the datum to the Earth.
 java.util.Date getRealizationEpoch()
          The time after which this datum definition is valid.
 org.opengis.util.InternationalString getScope()
          Description of domain of usage, or limitations of usage, for which this datum object is valid.
 org.opengis.metadata.extent.Extent getValidArea()
          Area or region in which this datum object is valid.
 
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, hashCode, 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.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Constructor Detail

AbstractDatum

public AbstractDatum(org.opengis.referencing.datum.Datum 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

AbstractDatum

public AbstractDatum(java.util.Map properties)
Constructs a datum from a set of properties. The properties given in argument follow the same rules than for the super-class constructor. Additionally, the following properties are understood by this construtor:

Property name Value type Value given to
 "anchorPoint"   InternationalString or String   getAnchorPoint()
 "realizationEpoch"   Date   getRealizationEpoch()
 "validArea"   Extent   getValidArea()
 "scope"   InternationalString or String   getScope()

Method Detail

getAnchorPoint

public org.opengis.util.InternationalString getAnchorPoint()
Description, possibly including coordinates, of the point or points used to anchor the datum to the Earth. Also known as the "origin", especially for Engineering and Image Datums.

Specified by:
getAnchorPoint in interface org.opengis.referencing.datum.Datum

getRealizationEpoch

public java.util.Date getRealizationEpoch()
The time after which this datum definition is valid. This time may be precise (e.g. 1997 for IRTF97) or merely a year (e.g. 1983 for NAD83). In the latter case, the epoch usually refers to the year in which a major recalculation of the geodetic control network, underlying the datum, was executed or initiated. An old datum can remain valid after a new datum is defined. Alternatively, a datum may be superseded by a later datum, in which case the realization epoch for the new datum defines the upper limit for the validity of the superseded datum.

Specified by:
getRealizationEpoch in interface org.opengis.referencing.datum.Datum

getValidArea

public org.opengis.metadata.extent.Extent getValidArea()
Area or region in which this datum object is valid.

Specified by:
getValidArea in interface org.opengis.referencing.datum.Datum

getScope

public org.opengis.util.InternationalString getScope()
Description of domain of usage, or limitations of usage, for which this datum object is valid.

Specified by:
getScope in interface org.opengis.referencing.datum.Datum

equals

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

Overrides:
equals in class AbstractIdentifiedObject
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.

formatWKT

protected java.lang.String formatWKT(Formatter formatter)
Format the inner part of a Well Known Text (WKT) element. Note: All subclasses will override this method, but only DefaultGeodeticDatum will not invokes this parent method, because horizontal datum do not write the datum type.

Overrides:
formatWKT in class Formattable
Parameters:
formatter - The formatter to use.
Returns:
The WKT element name.
See Also:
Formattable.toWKT(), Formattable.toString()


Copyright © GeoTools. All Rights Reserved.