Package org.geotools.referencing.datum
Class DefaultTemporalDatum
- Object
-
- Formattable
-
- AbstractIdentifiedObject
-
- AbstractDatum
-
- DefaultTemporalDatum
-
- All Implemented Interfaces:
Serializable
,Datum
,TemporalDatum
,IdentifiedObject
public class DefaultTemporalDatum extends AbstractDatum implements TemporalDatum
A temporal datum defines the origin of a temporal coordinate reference system.- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultTemporalDatum
DUBLIN_JULIAN
Datum for time measured since December 31, 1899 at 12:00 UTC.static DefaultTemporalDatum
JULIAN
Datum for time measured since January 1st, 4713 BC at 12:00 UTC.static DefaultTemporalDatum
MODIFIED_JULIAN
Datum for time measured since November 17, 1858 at 00:00 UTC.static DefaultTemporalDatum
TRUNCATED_JULIAN
Datum for time measured since May 24, 1968 at 00:00 UTC.static DefaultTemporalDatum
UNIX
Default datum for time measured since January 1st, 1970 at 00:00 UTC.-
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 DefaultTemporalDatum(String name, Date origin)
Constructs a temporal datum from a name.DefaultTemporalDatum(Map<String,?> properties, Date origin)
Constructs a temporal datum from a set of properties.DefaultTemporalDatum(TemporalDatum 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 boolean
equals(AbstractIdentifiedObject object, boolean compareMetadata)
Compare this temporal datum with the specified object for equality.InternationalString
getAnchorPoint()
Description of the point or points used to anchor the datum to the Earth.Date
getOrigin()
The date and time origin of this temporal datum.Date
getRealizationEpoch()
The time after which this datum definition is valid.int
hashCode()
Returns a hash value for this temporal datum.-
Methods inherited from class AbstractDatum
formatWKT, getDomainOfValidity, getScope
-
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, nameMatches, nameMatches, nameMatches
-
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
-
Methods inherited from interface Datum
getDomainOfValidity, getScope
-
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
-
-
-
Field Detail
-
JULIAN
public static final DefaultTemporalDatum JULIAN
Datum for time measured since January 1st, 4713 BC at 12:00 UTC.- Since:
- 2.5
- See Also:
DefaultTemporalCRS.JULIAN
-
MODIFIED_JULIAN
public static final DefaultTemporalDatum MODIFIED_JULIAN
Datum for time measured since November 17, 1858 at 00:00 UTC. A Modified Julian day (MJD) is defined relative to Julian day (JD) asMJD = JD − 2400000.5
.- Since:
- 2.5
- See Also:
DefaultTemporalCRS.MODIFIED_JULIAN
-
TRUNCATED_JULIAN
public static final DefaultTemporalDatum TRUNCATED_JULIAN
Datum for time measured since May 24, 1968 at 00:00 UTC. This epoch was introduced by NASA for the space program. A Truncated Julian day (TJD) is defined relative to Julian day (JD) asTJD = JD − 2440000.5
.- Since:
- 2.5
- See Also:
DefaultTemporalCRS.TRUNCATED_JULIAN
-
DUBLIN_JULIAN
public static final DefaultTemporalDatum DUBLIN_JULIAN
Datum for time measured since December 31, 1899 at 12:00 UTC. A Dublin Julian day (DJD) is defined relative to Julian day (JD) asDJD = JD − 2415020
.- Since:
- 2.5
- See Also:
DefaultTemporalCRS.DUBLIN_JULIAN
-
UNIX
public static final DefaultTemporalDatum UNIX
Default datum for time measured since January 1st, 1970 at 00:00 UTC.- See Also:
DefaultTemporalCRS.UNIX
,DefaultTemporalCRS.JAVA
-
-
Constructor Detail
-
DefaultTemporalDatum
public DefaultTemporalDatum(TemporalDatum 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
-
DefaultTemporalDatum
public DefaultTemporalDatum(String name, Date origin)
Constructs a temporal datum from a name.- Parameters:
name
- The datum name.origin
- The date and time origin of this temporal datum.
-
DefaultTemporalDatum
public DefaultTemporalDatum(Map<String,?> properties, Date origin)
Constructs a temporal 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"
.origin
- The date and time origin of this temporal datum.
-
-
Method Detail
-
getOrigin
public Date getOrigin()
The date and time origin of this temporal datum.- Specified by:
getOrigin
in interfaceTemporalDatum
- Returns:
- The date and time origin of this temporal datum.
-
getAnchorPoint
public InternationalString getAnchorPoint()
Description of the point or points used to anchor the datum to the Earth.- Specified by:
getAnchorPoint
in interfaceDatum
- Specified by:
getAnchorPoint
in interfaceTemporalDatum
- Overrides:
getAnchorPoint
in classAbstractDatum
- Returns:
- A description of the anchor point, or
null
if none.
-
getRealizationEpoch
public Date getRealizationEpoch()
The time after which this datum definition is valid.- Specified by:
getRealizationEpoch
in interfaceDatum
- Specified by:
getRealizationEpoch
in interfaceTemporalDatum
- Overrides:
getRealizationEpoch
in classAbstractDatum
- Returns:
- The datum realization epoch, or
null
if not available.
-
equals
public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
Compare this temporal datum with the specified object for equality.- Overrides:
equals
in classAbstractDatum
- Parameters:
object
- The object to compare tothis
.compareMetadata
-true
for performing a strict comparaison, orfalse
for comparing only properties relevant to transformations.- Returns:
true
if both objects are equal.
-
hashCode
public int hashCode()
Returns a hash value for this temporal datum. Name, remarks and the like are not taken in account. In other words, two temporal datums will return the same hash value if they are equal in the sense ofequals
(AbstractIdentifiedObject, false)- Overrides:
hashCode
in classAbstractIdentifiedObject
- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-
-