Package org.geotools.referencing.crs
Class DefaultTemporalCRS
Object
Formattable
AbstractIdentifiedObject
AbstractReferenceSystem
AbstractCRS
AbstractSingleCRS
DefaultTemporalCRS
- All Implemented Interfaces:
- Serializable,- CoordinateReferenceSystem,- SingleCRS,- TemporalCRS,- IdentifiedObject,- ReferenceSystem
A 1D coordinate reference system used for the recording of time.
 
 
| Used with CS type(s) | 
|---|
| Time | 
- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final DefaultTemporalCRSTime measured in days since December 31, 1899 at 12:00 UTC.static final DefaultTemporalCRSTime measured in milliseconds since January 1st, 1970 at 00:00 UTC.static final DefaultTemporalCRSTime measured in days since January 1st, 4713 BC at 12:00 UTC.static final Unit<Time>Unit for milliseconds.static final DefaultTemporalCRSTime measured in days since November 17, 1858 at 00:00 UTC.static final DefaultTemporalCRSTime measured in days since May 24, 1968 at 00:00 UTC.static final DefaultTemporalCRSTime measured in seconds since January 1st, 1970 at 00:00 UTC.Fields inherited from class AbstractSingleCRSdatumFields inherited from class AbstractCRScoordinateSystemFields inherited from class AbstractIdentifiedObjectEMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATORFields inherited from class FormattableSINGLE_LINEFields inherited from interface IdentifiedObjectALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface ReferenceSystemDOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultTemporalCRS(String name, TemporalDatum datum, TimeCS cs) Constructs a temporal CRS from a name.DefaultTemporalCRS(Map<String, ?> properties, TemporalDatum datum, TimeCS cs) Constructs a temporal CRS from a set of properties.Constructs a new temporal CRS with the same values than the specified one.DefaultTemporalCRS(TemporalDatum datum, TimeCS cs) Constructs a temporal CRS with the same properties than the given datum.
- 
Method SummaryModifier and TypeMethodDescriptionintReturns a hash value for this geographic CRS.Returns the coordinate system.getDatum()Returns the datum.toDate(double value) Convert the given value into aDateobject.doubleConvert the given date into a value in this axis unit.static DefaultTemporalCRSwrap(TemporalCRS crs) Wraps an arbitrary temporal CRS into a Geotools implementation.Methods inherited from class AbstractSingleCRSequals, getAxis, getDimensionMethods inherited from class AbstractCRSdistance, formatWKT, hashCodeMethods inherited from class AbstractReferenceSystemgetDomainOfValidity, getScopeMethods inherited from class AbstractIdentifiedObjectasSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatchesMethods inherited from class FormattablecleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTMethods inherited from interface IdentifiedObjectgetAlias, getIdentifiers, getName, getRemarks, toWKTMethods inherited from interface ReferenceSystemgetDomainOfValidity, getScope
- 
Field Details- 
JULIANTime measured in days since January 1st, 4713 BC at 12:00 UTC.- Since:
- 2.5
- See Also:
 
- 
MODIFIED_JULIANTime measured in days 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:
 
- 
TRUNCATED_JULIANTime measured in days 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:
 
- 
DUBLIN_JULIANTime measured in days 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:
 
- 
UNIXTime measured in seconds since January 1st, 1970 at 00:00 UTC.- Since:
- 2.5
- See Also:
 
- 
JAVATime measured in milliseconds since January 1st, 1970 at 00:00 UTC.- Since:
- 2.5
- See Also:
 
- 
MILLISECONDpublic static final Unit<Time> MILLISECONDUnit for milliseconds. Useful for conversion from and toDateobjects.
 
- 
- 
Constructor Details- 
DefaultTemporalCRSConstructs a new temporal CRS 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:
- crs- The coordinate reference system to copy.
- Since:
- 2.2
- See Also:
 
- 
DefaultTemporalCRSConstructs a temporal CRS with the same properties than the given datum. The inherited properties include the name and aliases.- Parameters:
- datum- The datum.
- cs- The coordinate system.
- Since:
- 2.5
 
- 
DefaultTemporalCRSConstructs a temporal CRS from a name.- Parameters:
- name- The name.
- datum- The datum.
- cs- The coordinate system.
 
- 
DefaultTemporalCRSConstructs a temporal CRS from a set of properties. The properties are given unchanged to the super-class constructor.- Parameters:
- properties- Set of properties. Should contains at least- "name".
- cs- The coordinate system.
- datum- The datum.
 
 
- 
- 
Method Details- 
wrapWraps an arbitrary temporal CRS into a Geotools implementation. This method is usefull if the user wants to take advantage oftoDate(double)andtoValue(java.util.Date)methods. If the supplied CRS is already an instance ofDefaultTemporalCRSor isnull, then it is returned unchanged.- Parameters:
- crs- The temporal CRS to wrap.
- Returns:
- The given CRS as a DefaultTemporalCRS.
 
- 
getCoordinateSystemReturns the coordinate system.- Specified by:
- getCoordinateSystemin interface- CoordinateReferenceSystem
- Specified by:
- getCoordinateSystemin interface- SingleCRS
- Specified by:
- getCoordinateSystemin interface- TemporalCRS
- Overrides:
- getCoordinateSystemin class- AbstractCRS
- Returns:
- The coordinate system.
 
- 
getDatumReturns the datum.- Specified by:
- getDatumin interface- SingleCRS
- Specified by:
- getDatumin interface- TemporalCRS
- Overrides:
- getDatumin class- AbstractSingleCRS
- Returns:
- The datum.
 
- 
toDateConvert the given value into aDateobject. This method is the converse oftoValue(java.util.Date).- Parameters:
- value- A value in this axis unit.
- Returns:
- The value as a date.
 
- 
toValueConvert the given date into a value in this axis unit. This method is the converse oftoDate(double).- Parameters:
- time- The value as a date.
- Returns:
- value A value in this axis unit.
 
- 
calculateHashCodepublic int calculateHashCode()Returns a hash value for this geographic CRS.- Overrides:
- calculateHashCodein class- AbstractSingleCRS
- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
 
 
-