Open mstefarov opened 6 years ago
@fragmer can you provide examples of this? Is this in the KML and/or WMS spec?
In KML documents, time is specified as a list of individual timestamps (instantaneous) and/or time spans (each with a start and/or end date). The KML specification has some examples. It's quite flexible and allows a single document to contain all kinds of uneven/mixed time data.
WMS is also quite flexible. Here are some examples in GeoServer docs. Three main patterns that we've seen are:
<Dimension name="time" default="2000-08-03T07:00:00Z" units="ISO8601">
2000-08-03T07:00:00.000Z,2000-08-04T07:00:00.000Z,2000-08-05T07:00:00.000Z,2000-08-06T07:00:00.000Z,2000-08-07T07:00:00.000Z,2000-08-08T07:00:00.000Z,2000-08-09T07:00:00.000Z,2000-08-10T07:00:00.000Z,2000-08-11T07:00:00.000Z,2000-08-12T07:00:00.000Z,2000-08-13T07:00:00.000Z,2000-08-14T07:00:00.000Z,2000-08-15T07:00:00.000Z,2000-08-16T07:00:00.000Z,2000-08-17T07:00:00.000Z,2000-08-18T07:00:00.000Z,2000-08-19T07:00:00.000Z,2000-08-20T07:00:00.000Z,2000-08-21T07:00:00.000Z,2000-08-22T07:00:00.000Z,2000-08-23T07:00:00.000Z,2000-08-24T07:00:00.000Z,2000-08-25T07:00:00.000Z,2000-09-01T07:00:00.000Z,2000-09-02T07:00:00.000Z,2000-09-03T07:00:00.000Z,2000-09-10T07:00:00.000Z,2000-09-11T07:00:00.000Z,2000-09-12T07:00:00.000Z,2000-09-13T07:00:00.000Z,2000-09-14T07:00:00.000Z,2000-09-15T07:00:00.000Z,2000-09-16T07:00:00.000Z,2000-09-17T07:00:00.000Z,2000-09-18T07:00:00.000Z,2000-09-19T07:00:00.000Z,2000-09-20T07:00:00.000Z,2000-09-21T07:00:00.000Z,2000-09-22T07:00:00.000Z,2000-09-23T07:00:00.000Z,2000-09-24T07:00:00.000Z,2000-09-25T07:00:00.000Z,2000-09-26T07:00:00.000Z,2000-09-27T07:00:00.000Z,2000-09-28T07:00:00.000Z,2000-09-29T07:00:00.000Z,2000-09-30T07:00:00.000Z,2000-10-01T07:00:00.000Z,2000-10-02T07:00:00.000Z,2000-10-03T07:00:00.000Z,2000-10-04T07:00:00.000Z,2000-10-05T07:00:00.000Z,2000-10-06T07:00:00.000Z,2000-10-07T07:00:00.000Z,2000-10-08T07:00:00.000Z,2000-10-09T07:00:00.000Z,2000-10-10T07:00:00.000Z,2000-10-15T07:00:00.000Z,2000-10-16T07:00:00.000Z,2000-10-17T07:00:00.000Z,2000-10-18T07:00:00.000Z,2000-10-19T07:00:00.000Z,2000-10-20T07:00:00.000Z,2000-10-21T07:00:00.000Z,2000-10-22T07:00:00.000Z
</Dimension>
Continuous time (range with no interval) or effectively-continuous time (a large range with 1s interval):
<Dimension name="time" default="2000-08-03T07:00:00Z" units="ISO8601">
2000-08-03T07:00:00.000Z/2000-10-22T07:00:00.000Z
</Dimension>
Evenly-spaced repeating interval (e.g. 1 day):
<Dimension name="time" default="2000-08-03T07:00:00Z" units="ISO8601">
2000-08-03T07:00:00.000Z/2000-10-22T07:00:00.000Z/P1D
</Dimension>
Time-aware WFS layers can also have this problem -- they do not necessarily have a TimeInterval.
In the current toolkit build, trying to InitializeTimeProperties on such layers results in a NullReferenceException being thrown:
> Esri.ArcGISRuntime.Toolkit.dll!Esri.ArcGISRuntime.Toolkit.Internal.TimeExtensions.IsGreaterThan(Esri.ArcGISRuntime.TimeValue timeValue, Esri.ArcGISRuntime.TimeValue otherTimeValue) Line 244 C#
Esri.ArcGISRuntime.Toolkit.dll!Esri.ArcGISRuntime.Toolkit.UI.Controls.TimeSlider.InitializeTimePropertiesAsync(Esri.ArcGISRuntime.UI.Controls.GeoView geoView) Line 1237 C#
Time-aware layers can have continuous or irregularly-spaced time data, so they don't specify either
ITimeAware.TimeInterval
orLayerTimeInfo.Interval
. This might be the case for WMS and for the hypothetical KML layers. The TimeSlider can't handle this yet: https://github.com/Esri/arcgis-toolkit-dotnet/blob/eee487e7a4045d60ae1b644ff33501866215838c/src/Esri.ArcGISRuntime.Toolkit/Esri.ArcGISRuntime.Toolkit/UI/Controls/TimeSlider/TimeSlider.cs#L1249-L1253