Skip to content
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

datetimes and datetime #18

Closed
m-mohr opened this issue Feb 4, 2025 · 3 comments · Fixed by #21 or #20
Closed

datetimes and datetime #18

m-mohr opened this issue Feb 4, 2025 · 3 comments · Fixed by #21 or #20

Comments

@m-mohr
Copy link
Collaborator

m-mohr commented Feb 4, 2025

I've had another look, and would like to discuss some thoughts:

  • datetimes can be empty, is this intentional? Shouldn't that require a minimum length of 2 (or 1, but then nothing is moving).
  • datetime is required to be null. I'd not require that as it can be useful in some scenarios where e.g. your server engine does only do search based on that property. As long as the best practices for this extension are clearly specified with regards to datetimes, datetime and start/end_datetime, I think there's no need to handle datetime specifically in the schema.

PS: There's a comment in the schema: "TODO: figure out how to make sure that datetimes has the same length as the geometry coordinates" - I'm afraid, but this is not possible with JSON Schema.

@keewis
Copy link
Collaborator

keewis commented Feb 4, 2025

Shouldn't that require a minimum length of 2 (or 1, but then nothing is moving).

I'd require at least two positions (and thus two datetimes) since that's what the moving features spec does. It seems LineString already requires two positions so to stay valid we'd have to require this for datetimes as well?

datetimes can be empty, is this intentional?

Are you talking about the json schema? If so, no, this is not intentional. If I remember correctly I intended to resolve this by making the number of elements in datetimes depend on the positions in the linestring, but as you point out this currently does not seem to be possible with JSON schema. I'll add a lower bound.

datetime is required to be null. I'd not require that as it can be useful in some scenarios

The reason why I chose to require null is that I'm not sure how you'd find a single timestamp that characterizes a time series. If that time series runs for a couple of months, for example, there's not really a single timestamp you could attach to characterize the entire time series, and any search based on that will not be that useful. Not sure if this is less of an issue in practice?

@m-mohr
Copy link
Collaborator Author

m-mohr commented Feb 4, 2025

The point is that there could be a single timestamp and a user may want to place it there. I'm not asking to require a single datetime, but just to no restrict it. So can be null or a datetime. Let the user choose what fits best for his usecase.

I was primarily speaking about the schema here, indeed.

@keewis
Copy link
Collaborator

keewis commented Feb 7, 2025

this should be resolved by #20 and #21

@keewis keewis closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants