-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues with temporal data, including (open) ranges / periods #155
Comments
Regarding the first issue: The introduction of RFC3339 explicetly mentions:
The periods mentioned in the WFS spec are just mentioned in the Annex, the title is "ISO 8601 Collected ABNF". Not sure why the periods are in there, but for me it sounds strange to refer to / rely on something that was explicetly stated to be not covered in the main text of the RFC and is only mentioned in an Annex that tries to create an ABNF for another spec (ISO 8601). |
Regarding the *second issue: I think it could be an option to just allow omitting parts of the temporal extent. |
Hmm, ISO8601 doesn't specify open-ended ranges, or how to do inclusive vs exclusive bounds... and the next release of the standard is still WIP: https://stackoverflow.com/a/48872488/2662 |
Thanks for commenting! |
Postgres’ ranges are extensive & feature-complete:
https://www.postgresql.org/docs/10/static/rangetypes.html
But null/infinity/inclusive/exclusive might be OTT for what we’re after
here.
_Personally_ `A <= t < B` (ie. A is inclusive and B is exclusive) is what
our team has coalesced around for range specifies. Where `null` for A/B
extends to infinity. eg. “August” is `2018-08-01, 2018-09-01`, regardless
of whether the particular timestamps are passed at
date/hour/minute/second/anything precision.
|
First issue:
Good catch. The idea was to restrict date/timestamps to the profiles specified in RFC3339. We need to be more precise here. Second issue: I agree we need open ranges. In our implementation we use |
Third issue: I do not have a strong opinion on this one. |
Fourth Issue: Oops, thanks for pointing this out! |
@cportele Thanks for answering this issue. Second issue: Somebody pointed out to me that ISO is preparing a new draft of ISO8601 and that they will probably add open date ranges by replacing the missing date with two dots (e.g. |
OK, if this is what ISO8601 will do, then this would seem to be the right approach. I will get more information on this and see how firm their ideas are. |
In the CD version of 8601-2 from 2016 they list two options:
This is a level 1 extension. The second option is the two-dots one and is a level 2 extension:
As this is from a draft in 2016 I need to find out, if this has changed in the meantime. |
+1 for: starting from: |
@tomkralidis are they |
@rcoup - I guess it is From the time interval definition in ISO 8601:
|
By the way, schema.org seems to be going for "..": https://webschemas.org/temporalCoverage |
So IIUC (would be nice to find the latest/current ISO 8601 draft though) to specify "events on 1 August between 3pm and 4pm UTC" it'd be
Likewise "any data from 1 August" would be
|
I now have access to the latest drafts of ISO 8601-1/2. Indeed, it has changed and it would be the double-dot notation in time intervals (blank is now "unknown"):
This is from the DIS version, which should be pretty stable. It should be final before in a few months. So, I propose we support the Open Start or End notation. |
I think it would be a mistake to ignore the reason for RFC 3339:
and
It feels like the direction that the discussion here is going is to say that the In my opinion, allowing for any date/time representation in ISO 8601 is a mistake. Since it puts an undue burden on servers to parse all of what ISO 8601 allows (and there is legitimate confusion over exactly what is allowed), most will handle an unspecified subset, and clients cannot know what to expect in terms of support. One alternative would be to define a syntax for intervals based on RFC 3339 alone. For example, in ABNF: wfs-interval-explicit = date-time "/" date-time
wfs-interval-open-start = "../" date-time
wfs-interval-open-end = date-time "/.."
wfs-interval = wfs-interval-explicit / wfs-interval-open-start / wfs-interval-open-end
wfs-time = date-time / wfs-interval Where the syntax for Another alternative would be to not try to cram all time handling into a single parameter and to instead wait until a more general filter syntax is figured out (that would allow logical expressions and operators that could be used to query by a time range). |
@tschaub - My intent was that only RFC 3339 is supported for instants and that we allow open intervals where each instant conforms to RFC 3339. I see that this wasn't that clear - and it should be explicitly stated in the requirements. Thanks. I still consider it important to have a simple capability for temporal filtering in the Core (just like we have that for spatial filtering). |
08-AUG-2019: Clemens will create a pull request as per Clemens' conclusion from 27OCT2018 comment. |
resolves #155 /Issues with temporal data, including (open) ranges / periods)
I have several issues with how temporal data is handled by WFS at the moment, which I'd like to draw your attention to and hopefully facilitate some fruitful discussion:
First issue: In several parts of the spec, e.g. OpenAPI spec and REQ_fc-time-response.adoc, it states that:
Examples given are:
RFC3339 does not specify any of that. Those formats are specified in ISO8601.
Second issue: Open date ranges, e.g. 2018-02-12T00:00:00Z until now, are not possible throughout the spec, may it be for filtering or describing data. We have use cases where this is required as data updates very frequently and it is not really a solution to update the timestamps in the accommodating collection metadata every time. Also it seems useful to search for data that is just newer or older than a timestamp.
Third issue: The temporal filter is specified to be named
time
. I don't really like that, because it's not specified to be just a time, but a date and a time. That's counter-intuitive. I'd vote to call itdatetime
instead. This would also allow to have an extension, which would allow to just filter by time, e.g. give me all features that are available at 12:00 or between 09:00 and 12:00. There was a similar discussion on that topic by the STAC guys: radiantearth/stac-spec#130Fourth issue: In several JSON schema and OpenAPI definitions a the
format
is set todateTime
, but both JSON Schema and OpenAPI propose that it should bedate-time
.The text was updated successfully, but these errors were encountered: