-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add support for uncertain date formats (ISO 8601-2:2019) #15
Comments
Over in this comment #146 (comment) @hroest asked about whether this is the place to handle uncertain dates: https://github.com/OpenHistoricalMap/DateFunctions-plpgsql I think the general answer is "yes" but there's a lot more to say. The functions over there convert an ISO date to a "decimal date" - a year plus a fractional decimal that allows us to reliably sort and filter items with the timeslider. We could in theory have methods to convert other date formats to "decimal date", but right now in all cases the translation would have to result in a single decimal number. So
I think each of these cases is solvable in code, but needs some clarity on what we want to do. |
handling date rangesBased on discussion in Discord with @padiwik, we have a feasible way forward here to at least manage these in the near term:
So given an input like
handling decadesFor decades with
|
why is your suggested behavior for decades distinct from other ranges? |
Ah, maybe you'd prefer the more conservative approach of
I am naturally glib and prefer to see more data with less certainty than vice versa. But very open to the inverse! |
I suggested the conservative approach because I don't believe |
Where are we on this, given recent discussions about parsers, etc.? I'm getting the sense that this may not be as tricky to implement across the stack (e.g. core db, tile filters, stylesheets, etc.) as I had thought. Am I wrong? We do have a lot of user requests for supporting this. A workaround I think might work (even if a workaround is lame) is [foo]_date.edtf =~1976 |
Unfortunately, I think it might be even more complex if we push the responsibility for parsing EDTF onto the client. The vector tiles currently encode The alternative of parsing within PostgresQL might be feasible. If we aren’t comfortable rolling our own parser in PL/pgSQL, perhaps ohm-deploy could define a Python function that uses python-edtf to do the parsing. Or a Rust function that uses edtf-rs if a Rust driver is installed, etc. |
What's your idea for a cool feature that would help you use OHM better.
It would be great to have support for uncertain dates and time ranges.
This uncertainty could accommodate for vague or unknown time starts, approximate dates, etc.
More details can be found at: https://www.iso.org/standard/70908.html
This feature will have significant impacts across OHM, to include data storage, rendering rules, and time slider behavior.
Current workarounds
None - the site currently requires specific, unqualified dates in the old 8601 format.
The text was updated successfully, but these errors were encountered: