GeoAPI provides a set of interfaces in programming languages (currently Java and Python) for geospatial applications. The GeoAPI interfaces closely follow OGC specifications, adaptated to match the expectations of programmers.
The following interfaces were derived from ISO 19108:2002 (Temporal Schema), but only empty place-holders were released in GeoAPI 3.0. Since that time, the Java standard library got a new java.time package. Given that ISO 19108 has not been used a lot in GeoAPI and that the java.time package is quite advanced, the Java profile of GeoAPI should use the standard Java library instead of ISO 19108 when a correspondence exists. The following mapping can apply:
ISO identifier
GeoAPI interface (Java)
Java standard API
TM_Duration
org.opengis.temporal.Duration
java.time.temporal.TemporalAmount
TM_IntervalLength
org.opengis.temporal.IntervalLength
java.time.Duration
TM_PeriodDuration
org.opengis.temporal.PeriodDuration
java.time.Period
The following sub-sections compare the ISO and Java specifications:
TM_Duration → TemporalAmount
ISOTM_Duration: A data type to be used for describing length or distance in the temporal dimension. Note: in practice, this is an empty interface defined only as the base interface of TM_IntervalLength and TM_PeriodDuration.
JavaTemporalAmount: Framework-level interface defining an amount of time, such as "6 hours", "8 days" or "2 years and 3 months". This is the base interface type for amounts of time. Note: this is the base interface of Duration and Period.
TM_IntervalLength → Duration
ISOTM_IntervalLength: A data type for intervals of time which supports the expression of duration in terms of a specified multiple of a single unit of time.
JavaDuration: A time-based amount of time, such as '34.5 seconds'. This class models a quantity or amount of time in terms of seconds and nanoseconds.
TM_PeriodDuration → Period
ISOTM_PeriodDuration: Uses the format specified by ISO 8601 for exchanging information about the duration of a period.
JavaPeriod: A date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'. This class models a quantity or amount of time in terms of years, months and days.
The following interfaces were derived from ISO 19108:2002 (Temporal Schema), but only empty place-holders were released in GeoAPI 3.0. Since that time, the Java standard library got a new
java.time
package. Given that ISO 19108 has not been used a lot in GeoAPI and that thejava.time
package is quite advanced, the Java profile of GeoAPI should use the standard Java library instead of ISO 19108 when a correspondence exists. The following mapping can apply:TM_Duration
org.opengis.temporal.Duration
java.time.temporal.TemporalAmount
TM_IntervalLength
org.opengis.temporal.IntervalLength
java.time.Duration
TM_PeriodDuration
org.opengis.temporal.PeriodDuration
java.time.Period
The following sub-sections compare the ISO and Java specifications:
TM_Duration → TemporalAmount
TM_Duration
: A data type to be used for describing length or distance in the temporal dimension. Note: in practice, this is an empty interface defined only as the base interface ofTM_IntervalLength
andTM_PeriodDuration
.TemporalAmount
: Framework-level interface defining an amount of time, such as "6 hours", "8 days" or "2 years and 3 months". This is the base interface type for amounts of time. Note: this is the base interface ofDuration
andPeriod
.TM_IntervalLength → Duration
TM_IntervalLength
: A data type for intervals of time which supports the expression of duration in terms of a specified multiple of a single unit of time.Duration
: A time-based amount of time, such as '34.5 seconds'. This class models a quantity or amount of time in terms of seconds and nanoseconds.TM_PeriodDuration → Period
TM_PeriodDuration
: Uses the format specified by ISO 8601 for exchanging information about the duration of a period.Period
: A date-based amount of time in the ISO-8601 calendar system, such as '2 years, 3 months and 4 days'. This class models a quantity or amount of time in terms of years, months and days.