org.geotools.referencing.datum
Class DefaultTemporalDatum

java.lang.Object
  extended by org.geotools.referencing.wkt.Formattable
      extended by org.geotools.referencing.AbstractIdentifiedObject
          extended by org.geotools.referencing.datum.AbstractDatum
              extended by org.geotools.referencing.datum.DefaultTemporalDatum
All Implemented Interfaces:
java.io.Serializable, org.opengis.referencing.datum.Datum, org.opengis.referencing.datum.TemporalDatum, org.opengis.referencing.IdentifiedObject

public class DefaultTemporalDatum
extends AbstractDatum
implements org.opengis.referencing.datum.TemporalDatum

A temporal datum defines the origin of a temporal coordinate reference system.

Since:
2.1
Version:
$Id: DefaultTemporalDatum.java 31000 2008-07-10 21:11:13Z desruisseaux $
Author:
Martin Desruisseaux (IRD)
See Also:
Serialized Form

Field Summary
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 org.geotools.referencing.AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
 
Fields inherited from class org.geotools.referencing.wkt.Formattable
SINGLE_LINE
 
Fields inherited from interface org.opengis.referencing.datum.Datum
ANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEY
 
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
 
Constructor Summary
DefaultTemporalDatum(java.util.Map<java.lang.String,?> properties, java.util.Date origin)
          Constructs a temporal datum from a set of properties.
DefaultTemporalDatum(java.lang.String name, java.util.Date origin)
          Constructs a temporal datum from a name.
DefaultTemporalDatum(org.opengis.referencing.datum.TemporalDatum datum)
          Constructs a new datum with the same values than the specified one.
 
Method Summary
 boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
          Compare this temporal datum with the specified object for equality.
 org.opengis.util.InternationalString getAnchorPoint()
          Description of the point or points used to anchor the datum to the Earth.
 java.util.Date getOrigin()
          The date and time origin of this temporal datum.
 java.util.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 org.geotools.referencing.datum.AbstractDatum
formatWKT, getDomainOfValidity, 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, nameMatches
 
Methods inherited from class org.geotools.referencing.wkt.Formattable
cleanupThreadLocals, 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
getDomainOfValidity, getScope
 
Methods inherited from interface org.opengis.referencing.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) as MJD = 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) as TJD = 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) as DJD = 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(org.opengis.referencing.datum.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(java.lang.String name,
                            java.util.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(java.util.Map<java.lang.String,?> properties,
                            java.util.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 java.util.Date getOrigin()
The date and time origin of this temporal datum.

Specified by:
getOrigin in interface org.opengis.referencing.datum.TemporalDatum
Returns:
The date and time origin of this temporal datum.

getAnchorPoint

public org.opengis.util.InternationalString getAnchorPoint()
Description of the point or points used to anchor the datum to the Earth.

Specified by:
getAnchorPoint in interface org.opengis.referencing.datum.Datum
Specified by:
getAnchorPoint in interface org.opengis.referencing.datum.TemporalDatum
Overrides:
getAnchorPoint in class AbstractDatum

getRealizationEpoch

public java.util.Date getRealizationEpoch()
The time after which this datum definition is valid.

Specified by:
getRealizationEpoch in interface org.opengis.referencing.datum.Datum
Specified by:
getRealizationEpoch in interface org.opengis.referencing.datum.TemporalDatum
Overrides:
getRealizationEpoch in class AbstractDatum

equals

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

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

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 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.


Copyright © 1996-2010 Geotools. All Rights Reserved.