org.geotools.referencing.datum
Class AbstractDatum

Object
  extended by Formattable
      extended by AbstractIdentifiedObject
          extended by AbstractDatum
All Implemented Interfaces:
Serializable, Datum, IdentifiedObject
Direct Known Subclasses:
DefaultEngineeringDatum, DefaultGeodeticDatum, DefaultImageDatum, DefaultTemporalDatum, DefaultVerticalDatum

public class AbstractDatum
extends AbstractIdentifiedObject
implements 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 Default prefix instead. An exception to this rule may occurs when it is not possible to identify the exact type.

Since:
2.1
Author:
Martin Desruisseaux (IRD)
See Also:
AbstractCS, AbstractCRS, Serialized Form
Module:
modules/library/referencing (gt-referencing.jar)

Field Summary
 
Fields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 
Fields inherited from class Formattable
SINGLE_LINE
 
Fields inherited from interface Datum
ANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEY
 
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
AbstractDatum(Datum datum)
          Constructs a new datum with the same values than the specified one.
AbstractDatum(Map<String,?> 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  String formatWKT(Formatter formatter)
          Format the inner part of a Well Known Text (WKT) element.
 InternationalString getAnchorPoint()
          Description, possibly including coordinates, of the point or points used to anchor the datum to the Earth.
 Extent getDomainOfValidity()
          Area or region or timeframe in which this datum is valid.
 Date getRealizationEpoch()
          The time after which this datum definition is valid.
 InternationalString getScope()
          Description of domain of usage, or limitations of usage, for which this datum object is valid.
 Extent getValidArea()
          Deprecated. Renamed getDomainOfValidity().
 
Methods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, hashCode, nameMatches, nameMatches, nameMatches
 
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
 

Constructor Detail

AbstractDatum

public AbstractDatum(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.

Parameters:
datum - The datum to copy.
Since:
2.2

AbstractDatum

public AbstractDatum(Map<String,?> 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()
 "domainOfValidity"   Extent   getDomainOfValidity()
 "scope"   InternationalString or String   getScope()

Parameters:
properties - The properties to be given to the identified object.
Method Detail

getAnchorPoint

public 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 Datum

getRealizationEpoch

public 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 Datum

getDomainOfValidity

public Extent getDomainOfValidity()
Area or region or timeframe in which this datum is valid.

Specified by:
getDomainOfValidity in interface Datum
Since:
2.4

getValidArea

public Extent getValidArea()
Deprecated. Renamed getDomainOfValidity().

Area or region in which this datum object is valid.


getScope

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

Specified by:
getScope in interface 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 this.
compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations.
Returns:
true if both objects are equal.

formatWKT

protected 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 © 1996-2010 Geotools. All Rights Reserved.