Changes between Version 11 and Version 12 of PetascopeTimeHandling


Ignore:
Timestamp:
Feb 27, 2014, 6:04:59 PM (11 years ago)
Author:
Piero Campalani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • PetascopeTimeHandling

    v11 v12  
    44
    55In this page we will describe how time can be embedded in the definition of a spatio-temporal coverage for WCS and WCPS web services, by means of temporal Coordinate Reference Systems (CRSs).
     6Attachment(s) are also included for further insights on the matter.
    67
    78== Temporal CRSs
     
    910Thanks to the [SecoreUserGuide SECORE] resolver, time can be embedded in the n-dimensional CRS space just as another dimension: temporal CRS definitions can be used in composition with geodetic ones to create a unique space-time aquarium for the coverage.
    1011
    11 Temporal CRSs (`gml:TemporalCRS`) are always 1D and are rather simple entities: in a few words, they count the amount of a certain time step from an epoch. No stratigraphic calendars, leap seconds, eras and eons are involved here: simple linear counting of time units. Time units are the Unit of Measure (!UoM) of the reference system.
     12Temporal CRSs (`gml:TemporalCRS`) are always 1D and are rather simple entities: in a few words, they count the amount of a certain time step from an epoch. No stratigraphic calendars, leap seconds, eras and eons are involved here: simple linear counting of time units. Time units are the Unit of Measure (UoM) of the reference system.
    1213
    1314[[Image(temporalCrs.png, center, 70%)]]
     
    2122
    2223   * [http://kahlua.eecs.jacobs-university.de:8080/def/crs/OGC/0/AnsiDate ANSI date] (`OGC:AnsiDate`) : linear count of days (labelled `'ansi'`) since 1^st^ of January 1601, 00h00 UTC (note that decimal coordinates are possible to reference fraction of the day).
    23    * [http://kahlua.eecs.jacobs-university.de:8080/def/crs/OGC/0/AnsiDate ANSI date] (`OGC:Temporal`) : parametrized CRS for the user-friendly definition of a custom T-CRS: it resolves to a concrete definition of T-CRS as long as the ''epoch'' and the ''!UoM'' are explicitly set in the query of the URI (and optionally an axis label and an axis direction: defaults are `'t'` and `'future'`). !UoMs can be defines as either [http://unitsofmeasure.org/ucum.html UCUM] `c/s` codes or actionable URIs pointing to valid GML definition of !UoMs; UCUM codes or URIs like http://www.opengis.net/def/uom/UCUM/0/<code> (which the OGC SISSVoc redirects to the UCUM web page) or codes are suggested here: our ISO timestamp parser relies on UCUM codes too.
     24   * [http://kahlua.eecs.jacobs-university.de:8080/def/crs/OGC/0/AnsiDate ANSI date] (`OGC:Temporal`) : parametrized CRS for the user-friendly definition of a custom T-CRS: it resolves to a concrete definition of T-CRS as long as the ''epoch'' and the ''UoM'' are explicitly set in the query of the URI (and optionally an axis label and an axis direction: defaults are `'t'` and `'future'`). !UoMs can be defines as either [http://unitsofmeasure.org/ucum.html UCUM] `c/s` codes or actionable URIs pointing to valid GML definition of !UoMs; UCUM codes or URIs like http://www.opengis.net/def/uom/UCUM/0/<code> (which the OGC SISSVoc redirects to the UCUM web page) or codes are suggested here: our ISO timestamp parser relies on UCUM codes too.
    2425
    2526For a full list of time resources under review by OGC-NA please visit [http://external.opengeospatial.org/twiki_public/TemporalDWG/TemporalCrsUris this page] (active participation is also appreciated via [https://lists.opengeospatial.org/mailman/listinfo/temporal mailing list]). After official acknowledgment of such resources, all of them will be provided by our resolver and additionally by the official 'opengis' servers.
     
    5051Once a T-CRS has been successfully embedded in the overall native CRS of a coverage, the WCS/WCPS services will accept both numerical and time coordinates on the time axis/axes.
    5152
    52 In the first place, one should also be aware of the difference between the time resolution (!UoM) of the T-CRS and the adopted ''offset vector'' ruling the spacing along time for the coverage: on 1-norm vectors there is no such difference, however it is perfectly possible to use either a bigger vector (e.g. equal to 7 on a day-resolution T-CRS for weekly data) or a fractional one. For more on offset vectors l please refer to the ''Petascope'' [PetascopeUserGuide user guide].
     53In the first place, one should also be aware of the difference between the time resolution (UoM) of the T-CRS and the adopted ''offset vector'' ruling the spacing along time for the coverage: on 1-norm vectors there is no such difference, however it is perfectly possible to use either a bigger vector (e.g. equal to 7 on a day-resolution T-CRS for weekly data) or a fractional one. For more on offset vectors l please refer to the ''Petascope'' [PetascopeUserGuide user guide].
    5354
    5455As with normal spatial axes, a WCS/WCPS subsets shall define numeric trimming and slicings on a CRS dimension. The [https://portal.opengeospatial.org/files/?artifact_id=50140 standard] however let the subset syntax adhere to EBNF [IETF 2616], allowing ''tokens'' inside double-quotes: on time dimensions then ISO:8601 datetime representations can be used in place of the usually less friendly numeric time coordinates.
     
    7273For practical examples see our related [browser:applications/petascope/src/test/java/petascope/util/TimeUtilTest.java unit tests] or our WCS [browser:systemtest/testcases_services/test_wcs/queries systemtest queries] n.{27-28, 35-37}.
    7374
    74 Regarding the responses to a WCS request, time is encoded in its numerical form. The T-CRS definition is the key to decode the meaning of such numbers: while sometimes well-known T-CRS can be used (as Unix time), the general formulas which is yielding time coordinate `t^` for a coverage `C` with offset vector `v_t` along time and using a T-CRS with epoch `O_t` and !UoM 't_uom`:
    75 
    76 {{{
    77 time(t^) = ("t^" - O_t)/(v_t*t_uom)
    78 "iso_datetime(t^)" = "O_t" + t^*("t_uom"*v_t)
    79 }}}
    80 
    81 Double quotes imply ISO:8601 representation, whereas unquoted variable refer to numeric time values.
     75Regarding the responses to a WCS request, time is encoded in its numerical form. The T-CRS definition is the key to decode the meaning of such numbers: while sometimes well-known T-CRS can be used (as Unix time), the general principle is that the time coordinate `T'` is the representation of `(v_t*T')` time steps (T-CRS UoM) from the epoch of the T-CRS, being `v_t` the scalar norm of the offset vector of the coverage along time.
    8276In order to ease the user, it is foreseen the use of `gml:EnvelopeWithTimePeriod` (see #678) to additionally provide literals of time in the bbox of a coverage.
    8377
     
    8579== Irregular time series
    8680
    87 ..independent of time: irregular aligned grids can be defined (see ''Petascope'' [PetascopeUserGuide user guide].) the CRS is also independent of the topology of the referenced grid..
    88 To import ... additional coefficients will be ... so that the numerical coordinate is:
    89 `formula: ...`
    90  See also ''rasgeo'' [RasgeoUserGuide user guide].
     81In addition to the inclusion of time in the compound CRS where a coverage is located, importing irregular time series in [PetascopeUserGuide Petascope] is also possible, although this not connected to the definition of perhaps a different T-CRS. The topology of a coverage (along the time dimension in this case) is independent of the way time is measured.
    9182
     83To import irregular time series you can either manually fill in the so-called vector weighting '''coefficients''' of the offset vector along time (see the ''Petascope'' [PetascopeDevGuide dev-guide]) or otherwise use our ''rasgeo'' component to handle the irregular time series directly with absolute time coordinates via the `'--z-coords'` parameter of `rasimport` (see [RasgeoUserGuide user guide] for more details.
    9284
    93 See attachments for farther resources on the topic.
     85To better understand the meaining of (GML) weighting vector [http://schemas.opengis.net/gml/3.3/referenceableGrid.xsd coefficients], the general principle to decode numeric time coordinates is that the time coordinate `T'` is the representation of `[(c_i*v_t) * T']` time steps (T-CRS UoM) from the epoch of the T-CRS, being `v_t` the scalar norm of the offset vector of the coverage along time and `c_i` the coefficient associated to the `i`-th level in time.