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 DefaultTemporalCRS
Time measured in days since December 31, 1899 at 12:00 UTC.static final DefaultTemporalCRS
Time measured in milliseconds since January 1st, 1970 at 00:00 UTC.static final DefaultTemporalCRS
Time measured in days since January 1st, 4713 BC at 12:00 UTC.static final Unit<Time>
Unit for milliseconds.static final DefaultTemporalCRS
Time measured in days since November 17, 1858 at 00:00 UTC.static final DefaultTemporalCRS
Time measured in days since May 24, 1968 at 00:00 UTC.static final DefaultTemporalCRS
Time measured in seconds since January 1st, 1970 at 00:00 UTC.Fields inherited from class AbstractSingleCRS
datum
Fields inherited from class AbstractCRS
coordinateSystem
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 IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Fields 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 TypeMethodDescriptionint
Returns a hash value for this geographic CRS.Returns the coordinate system.getDatum()
Returns the datum.toDate
(double value) Convert the given value into aDate
object.double
Convert the given date into a value in this axis unit.static DefaultTemporalCRS
wrap
(TemporalCRS crs) Wraps an arbitrary temporal CRS into a Geotools implementation.Methods inherited from class AbstractSingleCRS
equals, getAxis, getDimension
Methods inherited from class AbstractCRS
distance, formatWKT, hashCode
Methods inherited from class AbstractReferenceSystem
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 IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
Methods 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 toDate
objects.
-
-
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 ofDefaultTemporalCRS
or 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:
getCoordinateSystem
in interfaceCoordinateReferenceSystem
- Specified by:
getCoordinateSystem
in interfaceSingleCRS
- Specified by:
getCoordinateSystem
in interfaceTemporalCRS
- Overrides:
getCoordinateSystem
in classAbstractCRS
- Returns:
- The coordinate system.
-
getDatum
Returns the datum.- Specified by:
getDatum
in interfaceSingleCRS
- Specified by:
getDatum
in interfaceTemporalCRS
- Overrides:
getDatum
in classAbstractSingleCRS
- Returns:
- The datum.
-
toDate
Convert the given value into aDate
object. 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:
calculateHashCode
in classAbstractSingleCRS
- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-