- All Superinterfaces:
CoordinateSystem
,IdentifiedObject
@UML(identifier="TemporalCS",
specification=ISO_19111)
public interface TimeCS
extends CoordinateSystem
A 1-dimensional coordinate system containing a single time axis.
This coordinate system is used to describe the temporal position of a point
in the specified time units from a time origin implied by the temporal datum.
ISO 19111 defines three forms of temporal coordinate system:
- Measure of a temporal quantity as real numbers.
- Count of a temporal quantity as integer numbers.
- Numbers related to dates or times expressed in the proleptic Gregorian calendar.
getCoordinateType()
.
GeoAPI does not define specialized sub-interfaces for each form.
This type of CS can be used by coordinate reference systems of type
TemporalCRS
, potentially in combination with
DerivedCRS
.
- Since:
- 2.0
- See Also:
Departure from OGC/ISO standard for closer integration with the Java environment
ISO 19111:2019 renamed this interface fromTimeCS
to TemporalCS
.
GeoAPI has kept the ISO 19111:2007 interface name for historical reasons,
but also to emphasize the relationship with the java.time
package.
-
Field Summary
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, DOMAINS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Method Summary
Modifier and TypeMethodDescriptionReturns the type (measure, integer or data-time) of coordinate values.default int
Returns the number of dimensions, which is 1 for this type of coordinate system.default TemporalUnit
Returns the unit of measurement of coordinate values.Methods inherited from interface org.opengis.referencing.cs.CoordinateSystem
getAxis
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getDomains, getIdentifiers, getName, getRemarks, toWKT
-
Method Details
-
getDimension
Returns the number of dimensions, which is 1 for this type of coordinate system.- Specified by:
getDimension
in interfaceCoordinateSystem
- Returns:
- always 1.
-
getCoordinateType
@UML(identifier="coordinateType", obligation=MANDATORY, specification=ISO_19111) CoordinateDataType getCoordinateType()Returns the type (measure, integer or data-time) of coordinate values. If the time interval between two integer values is constant and interpolations are allowed, then the returned value will typically beCoordinateDataType.MEASURE
. If the time interval is not constant but can be related to some field of the Gregorian calendar (e.g., months or years), then the returned value can beCoordinateDataType.DATE_TIME
.- Returns:
- the type of coordinate values.
- Since:
- 3.1
-
getTemporalUnit
Returns the unit of measurement of coordinate values. The returned unit is equivalent to the unit returned byCoordinateSystemAxis.getUnit()
, but expressed as ajava.time
object, preferably an instance from theChronoUnit
enumeration.Note that contrarily to the usual units of measurement, the duration of
java.time
units can vary. For exampleChronoUnit.DAYS
is estimated to be about 24 hours long, because the actual duration can vary due to daylight saving time changes. Implementations can specify whether the temporal unit is estimated or exact withTemporalUnit.isDurationEstimated()
.Default implementation
The default implementation returns aChronoUnit
or a multiple of aChronoUnit
with a duration equals to 1 axis unit. If and only if the coordinate type isCoordinateDataType.DATE_TIME
, the search forChronoUnit
is relaxed with an arbitrary tolerance of one hour per month for units equal or longer thanChronoUnit.MONTHS
. The intend is to accept different definitions of years, for example, 365.2425 days according Java versus 365.24219265 days according the IUGS definition of tropical year.- Returns:
- unit measurement of coordinate values, preferably as a
ChronoUnit
enumeration value. - Since:
- 3.1
- See Also:
-