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

Handle recursion of super-relations in Augmented Diffs #10

Open
CloudNiner opened this issue Apr 17, 2020 · 0 comments
Open

Handle recursion of super-relations in Augmented Diffs #10

CloudNiner opened this issue Apr 17, 2020 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@CloudNiner
Copy link
Contributor

This issue is more for bookkeeping of research done while developing the initial implementation. We discovered that overpass augmented diffs do not recurse, so we will not do so either in onramp.

The wiki page on super relations is quite helpful in describing them, general support, and a few examples: https://wiki.openstreetmap.org/wiki/Super-Relation

To verify that the augmented diffs do not recurse, I looked at the Great Lakes super-relation: https://www.openstreetmap.org/relation/1124369#map=7/47.961/-86.512

Then I found the most recent changeset (at time of writing) and downloaded the XML for it:
https://www.openstreetmap.org/api/0.6/changeset/79649626/download

This gave me a changeset timestamp 2020-01-16T12:12:19Z to convert into a adiff sequence id 3862397.

Lastly, I queried Overpass for the relevant augmented diff:
http://overpass-api.de/api/augmented_diff?id=3862397

I was able to find the adiff representation of the Great Lakes super relation in this augmented diff:

<action type="modify">
<old>
  <relation id="1124369" version="90" timestamp="2018-11-22T22:33:51Z" changeset="64795624" uid="9080660" user="أحمدو">
    <member type="relation" ref="1206310" role=""/>
    <member type="relation" ref="1205151" role=""/>
    <member type="relation" ref="1205149" role=""/>
    <member type="relation" ref="4039486" role=""/>
    <member type="relation" ref="4039900" role=""/>
  </relation>
</old>
<new>
  <relation id="1124369" version="95" timestamp="2020-01-16T12:12:19Z" changeset="79649626" uid="18480" user="nickvet419">
    <member type="relation" ref="1206310" role=""/>
    <member type="relation" ref="1205151" role=""/>
    <member type="relation" ref="1205149" role=""/>
    <member type="relation" ref="4039486" role=""/>
    <member type="relation" ref="4039900" role=""/>
    <tag k="alt_name:cs" v="Velká kanadská jezera"/>
    ...
</new>
</action>

And then also verified that child relations that were otherwise unchanged in this changeset, e.g. 1206310, were not contained in the same augmented diff.

The takeaway is that overpass generated augmented diffs for super relations do not recurse, so we will not either in order to remain consistent. Conveniently, this saves us from solving a complicated technical problem for our initial implementation 🎉

@CloudNiner CloudNiner added the documentation Improvements or additions to documentation label Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant