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 Summary
FieldsModifier 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 AbstractSingleCRS
datumFields inherited from class AbstractCRS
coordinateSystemFields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATORFields inherited from class Formattable
SINGLE_LINEFields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface ReferenceSystem
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY -
Constructor Summary
ConstructorsConstructorDescriptionDefaultTemporalCRS(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 Summary
Modifier 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 AbstractSingleCRS
equals, getAxis, getDimensionMethods inherited from class AbstractCRS
distance, formatWKT, hashCodeMethods inherited from class AbstractReferenceSystem
getDomainOfValidity, getScopeMethods 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, nameMatchesMethods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTMethods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKTMethods inherited from interface ReferenceSystem
getDomainOfValidity, getScope
-
Field Details
-
JULIAN
Time measured in days since January 1st, 4713 BC at 12:00 UTC.- Since:
- 2.5
- See Also:
-
MODIFIED_JULIAN
Time 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_JULIAN
Time 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_JULIAN
Time 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:
-
UNIX
Time measured in seconds since January 1st, 1970 at 00:00 UTC.- Since:
- 2.5
- See Also:
-
JAVA
Time measured in milliseconds since January 1st, 1970 at 00:00 UTC.- Since:
- 2.5
- See Also:
-
MILLISECOND
public static final Unit<Time> MILLISECONDUnit for milliseconds. Useful for conversion from and toDateobjects.
-
-
Constructor Details
-
DefaultTemporalCRS
Constructs 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:
-
DefaultTemporalCRS
Constructs 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
-
DefaultTemporalCRS
Constructs a temporal CRS from a name.- Parameters:
name- The name.datum- The datum.cs- The coordinate system.
-
DefaultTemporalCRS
Constructs 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
-
wrap
Wraps 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.
-
getCoordinateSystem
Returns the coordinate system.- Specified by:
getCoordinateSystemin interfaceCoordinateReferenceSystem- Specified by:
getCoordinateSystemin interfaceSingleCRS- Specified by:
getCoordinateSystemin interfaceTemporalCRS- Overrides:
getCoordinateSystemin classAbstractCRS- Returns:
- The coordinate system.
-
getDatum
Returns the datum.- Specified by:
getDatumin interfaceSingleCRS- Specified by:
getDatumin interfaceTemporalCRS- Overrides:
getDatumin classAbstractSingleCRS- Returns:
- The datum.
-
toDate
Convert 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.
-
toValue
Convert 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.
-
calculateHashCode
public int calculateHashCode()Returns a hash value for this geographic CRS.- Overrides:
calculateHashCodein classAbstractSingleCRS- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-