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

Same element appears twice in adiff output #712

Open
zstadler opened this issue Nov 9, 2023 · 1 comment
Open

Same element appears twice in adiff output #712

zstadler opened this issue Nov 9, 2023 · 1 comment
Labels

Comments

@zstadler
Copy link

zstadler commented Nov 9, 2023

When running the following adiff query (try it on Overpass Turbo)

[adiff:
 "2023-10-01T00:00:00Z",
 "2023-11-01T00:00:00Z"];
way
  (32.09611804750574,
   34.77323055267335,
   32.097399712763256,
   34.77997899055482);
compare(delta:1);
out meta geom;

The output contains two actions for <way id="42561699". (See its OSM history)
One action has type="modify" and the other has type="delete", as listed below.

Several observations:

  1. IMO, the way should not be included in the output as the element existed on both dates
  2. If a smaller bbox is used, the problem disappears

output snippets

<action type="modify">

<action type="modify">
<old>
  <way id="42561699" version="7" timestamp="2023-06-14T12:58:19Z" changeset="137327819" uid="1298075" user="Sokuya">
    <bounds minlat="32.0965915" minlon="34.7732989" maxlat="32.0972719" maxlon="34.7737627"/>
    <nd ref="558792806" lat="32.0972719" lon="34.7734611"/>
    <nd ref="558792808" lat="32.0972157" lon="34.7737627"/>
    <nd ref="531617012" lat="32.0965915" lon="34.7736007"/>
    <nd ref="531617011" lat="32.0966478" lon="34.7732989"/>
    <nd ref="558792806" lat="32.0972719" lon="34.7734611"/>
    <tag k="building" v="yes"/>
    <tag k="name" v="האנגר 8"/>
    <tag k="name:en" v="Hangar 8"/>
    <tag k="name:he" v="האנגר 8"/>
  </way>
</old>
<new>
  <way id="42561699" version="13" timestamp="2023-10-30T01:35:38Z" changeset="143337015" uid="1778799" user="SomeoneElse_Revert">
    <bounds minlat="32.0965915" minlon="34.7732989" maxlat="32.0972719" maxlon="34.7737627"/>
    <nd ref="558792806" lat="32.0972719" lon="34.7734611"/>
    <nd ref="558792808" lat="32.0972157" lon="34.7737627"/>
    <nd ref="531617012" lat="32.0965915" lon="34.7736007"/>
    <nd ref="531617011" lat="32.0966478" lon="34.7732989"/>
    <nd ref="558792806" lat="32.0972719" lon="34.7734611"/>
    <tag k="building" v="yes"/>
    <tag k="name" v="האנגר 8"/>
    <tag k="name:en" v="Hangar 8"/>
    <tag k="name:he" v="האנגר 8"/>
  </way>
</new>
</action>

<action type="delete">

<action type="delete">
<old>
  <way id="42561699" version="7" timestamp="2023-06-14T12:58:19Z" changeset="137327819" uid="1298075" user="Sokuya">
    <bounds minlat="32.0965915" minlon="34.7732989" maxlat="32.0972719" maxlon="34.7737627"/>
    <nd ref="558792806" lat="32.0972719" lon="34.7734611"/>
    <nd ref="558792808" lat="32.0972157" lon="34.7737627"/>
    <nd ref="531617012" lat="32.0965915" lon="34.7736007"/>
    <nd ref="531617011" lat="32.0966478" lon="34.7732989"/>
    <nd ref="558792806" lat="32.0972719" lon="34.7734611"/>
    <tag k="building" v="yes"/>
    <tag k="name" v="האנגר 8"/>
    <tag k="name:en" v="Hangar 8"/>
    <tag k="name:he" v="האנגר 8"/>
  </way>
</old>
<new>
  <way id="42561699" visible="true" version="13" timestamp="2023-10-30T01:35:38Z" changeset="143337015" uid="1778799" user="SomeoneElse_Revert"/>
</new>
</action>
@mmd-osm
Copy link
Contributor

mmd-osm commented Nov 11, 2023

Below I've added a simpler test case, which returns the way twice, at least on the main instance, and on kumi.systems.

On instances where the way doesn't appear twice (e.g. //overpass.osmcha.org/api/), also the query posted by OP doesn't include way 42561699.

Seeing two ways in the following query seems to be a prerequisite for the issue.

[date:"2023-10-01T00:00:00Z"];
way(42561699);
out meta;

Also timeline shows the duplicate version number:

timeline(way,42561699);
for (t["created"])
{
  retro (_.val)
  {
    way(42561699);
    out meta;
  }
}

@drolbr drolbr added the bug label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants