Skip to content

Metadata

The class diagram of temporal data and geospatial extent classes:

📅 Temporal data

Temporal data can be represented as instants (a time stamp) and intervals (an open or a closed interval between time stamps).

// Instants can be created from `DateTime` or parsed from text.
Instant(DateTime.utc(2020, 10, 31, 09, 30));
Instant.parse('2020-10-31 09:30Z');
// Intervals (open-started, open-ended, closed).
Interval.openStart(DateTime.utc(2020, 10, 31));
Interval.openEnd(DateTime.utc(2020, 10, 01));
Interval.closed(DateTime.utc(2020, 10, 01), DateTime.utc(2020, 10, 31));
// Same intervals parsed (by the "start/end" format, ".." for open limits).
Interval.parse('../2020-10-31');
Interval.parse('2020-10-01/..');
Interval.parse('2020-10-01/2020-10-31');

🌐 Geospatial extents

Extent objects have both spatial bounds and temporal interval, and they are useful in metadata structures for geospatial data sources.

// An extent with spatial (WGS 84 longitude-latitude) and temporal parts.
GeoExtent.single(
crs: CoordRefSys.CRS84,
bbox: GeoBox(west: -20.0, south: 50.0, east: 20.0, north: 60.0),
interval: Interval.parse('../2020-10-31'),
);
// An extent with multiple spatial bounds and temporal interval segments.
GeoExtent.multi(
crs: CoordRefSys.CRS84,
boxes: [
GeoBox(west: -20.0, south: 50.0, east: 20.0, north: 60.0),
GeoBox(west: 40.0, south: 50.0, east: 60.0, north: 60.0),
],
intervals: [
Interval.parse('2020-10-01/2020-10-05'),
Interval.parse('2020-10-27/2020-10-31'),
],
);

See the section about coordinate reference systems for the description of CoordRefSys.