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

Augmented-difference empty results #734

Open
Zaczero opened this issue Jun 28, 2024 · 2 comments
Open

Augmented-difference empty results #734

Zaczero opened this issue Jun 28, 2024 · 2 comments

Comments

@Zaczero
Copy link

Zaczero commented Jun 28, 2024

Affected node: https://www.openstreetmap.org/node/3809873262/history

When retrieving adiff between v3 and v5 (both are deleted), the response is empty.

Example query: https://overpass-turbo.eu/s/1NvB

I expected the response to be:

<action type="delete">  # or modify
<old>
  <node id="3809873262" visible="false" version="3" timestamp="2024-03-03T18:29:54Z" changeset="148177328" uid="16834111" user="the13thsense"/>
</old>
<new>
  <node id="3809873262" visible="false" version="5" timestamp="2024-03-07T19:01:30Z" changeset="148356229" uid="6168709" user="Udarian"/>
</new>
</action>

Is that intended behavior or a bug?

@drolbr
Copy link
Owner

drolbr commented Jul 2, 2024

This is a tricky question. As of today, it is intended behaviour.

However, the augmented diff feature is barely used. So if we can hammer out useful semantics that are backwards compatible or almost backwards compatible then I'm willing to change it.

What currently happens:

  • line 1 yields an empty result for 2024-03-03T18:29:54Z.
  • line 1 yields again an empty result now.
  • The algorithm decides that there is no difference.

What happens in other adiff cases:

  • an object that is there at the old date but no longer at the new date is chased by id for the meta data associated with its whereabouts.

Note that line 2 does not know for what kind of object has been asked for, and line 1 does not know that it runs in an adiff setting. Think about cases like someone adiffing a bounding box, a tag globally, or a tag in a bounding box. Shall all objects appear that ever beared that tag or lived in the bounding box? I'm happy for a discussion.

@Zaczero
Copy link
Author

Zaczero commented Jul 2, 2024

line 1 yields an empty result for 2024-03-03T18:29:54Z.
line 1 yields again an empty result now.

From my perspective, returning empty results for visible="false" object is incorrect. This is intuitive from human perspective, but not from scripting/data perspective. There is very little difference between visible="true" and visible="false" elements, the only being whether they're shown to the user or not. Given my very limited understanding of Overpass, I would always return all elements (ignoring the visible flag), and perform visibility filtering as an optional final stage. This would make Overpass behavior predictable and customizable.

Edit: To clarify one detail, visible="false" nodes should not be queryable by bbox, given that they have no geographic location. However, they should be when requested directly by id (because they do exist in the data).

Edit2: And here's why this behavior seems like a bug: if we use adiff to compare between V1 and V2 where nothing changes (tags, location, members) except the version number, we receive results, despite there being virtually no difference. Now that we repeat this query for versions that are visible="false", we receive no results. The current behavior is not consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants