Package org.geotools.referencing.datum
Class AbstractDatum
- Object
-
- Formattable
-
- AbstractIdentifiedObject
-
- 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
Defaultprefix 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
-
-
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
Constructors Constructor Description AbstractDatum(Map<String,?> properties)Constructs a datum from a set of properties.AbstractDatum(Datum datum)Constructs a new datum with the same values than the specified one.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(AbstractIdentifiedObject object, boolean compareMetadata)Compares the specified object with this datum for equality.protected StringformatWKT(Formatter formatter)Format the inner part of a Well Known Text (WKT) element.InternationalStringgetAnchorPoint()Description, possibly including coordinates, of the point or points used to anchor the datum to the Earth.ExtentgetDomainOfValidity()Area or region or timeframe in which this datum is valid.DategetRealizationEpoch()The time after which this datum definition is valid.InternationalStringgetScope()Description of domain of usage, or limitations of usage, for which this datum object is valid.-
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, toWKT
-
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"InternationalStringorStringgetAnchorPoint()"realizationEpoch"DategetRealizationEpoch()"domainOfValidity"ExtentgetDomainOfValidity()"scope"InternationalStringorStringgetScope()- 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.- For a geodetic datum, this point is also known as the fundamental point, which is traditionally the point where the relationship between geoid and ellipsoid is defined. In some cases, the "fundamental point" may consist of a number of points. In those cases, the parameters defining the geoid/ellipsoid relationship have then been averaged for these points, and the averages adopted as the datum definition.
- For an engineering datum, the anchor point may be a physical point, or it may be a point with defined coordinates in another CRS.
- For an image datum, the anchor point is usually either the centre of the image or the corner of the image.
- For a temporal datum, this attribute is not defined. Instead of the anchor point, a temporal datum carries
a separate time origin of type
Date.
- Specified by:
getAnchorPointin interfaceDatum- Returns:
- A description of the anchor point, or
nullif none.
-
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:
getRealizationEpochin interfaceDatum- Returns:
- The datum realization epoch, or
nullif not available.
-
getDomainOfValidity
public Extent getDomainOfValidity()
Area or region or timeframe in which this datum is valid.- Specified by:
getDomainOfValidityin interfaceDatum- Returns:
- The datum valid domain, or
nullif not available. - Since:
- 2.4
-
getScope
public InternationalString getScope()
Description of domain of usage, or limitations of usage, for which this datum object is valid.
-
equals
public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
Compares the specified object with this datum for equality.- Overrides:
equalsin classAbstractIdentifiedObject- Parameters:
object- The object to compare tothis.compareMetadata-truefor performing a strict comparaison, orfalsefor comparing only properties relevant to transformations.- Returns:
trueif 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
DefaultGeodeticDatumwill not invokes this parent method, because horizontal datum do not write the datum type.- Overrides:
formatWKTin classFormattable- Parameters:
formatter- The formatter to use.- Returns:
- The WKT element name.
- See Also:
Formattable.toWKT(),Formattable.toString()
-
-