[openstreetmap/openstreetmap-website] changesets API call with time range does not work as expected (#1204)
notifications at github.com
Sat Apr 16 16:18:31 UTC 2016
The logic _should be_, although it's always possible that there are bugs, that changesets are time ranges; a changeset may contain edits with timestamps between its `created_at` and `closed_at` times. The query window is _also_ a time range, and the purpose of that clause was to find changesets overlapping the query window, so we need to test the maximum extent of the changeset time range, `closed_at`, against the minimum extent of the query window, `from`, and the minimum extent of the changeset time range, `created_at`, against the maximum extent of the query window, `to`.
As an example, consider:
1. Changeset 1, created at 1pm and closed at 2pm,
2. Changeset 2, created at 3pm and closed at 4pm.
Let's imagine we want to query for all changesets which might have been active between 1:30pm and 3:30pm, then we need to include both changesets 1 & 2.
All that being said, last time I checked usage stats, the changesets query API was hardly used. Partly, I suppose, because it was always a bit slow. But mainly that querying changesets rather than changes has turned out to be of limited usefulness. Instead we've got systems like overpass and OWL<sup>†</sup>, which query the changes directly. I think the changesets query API is a good candidate for removal at the next API revision.
†: for some values of "got".
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rails-dev