Opened 6 years ago

Closed 6 years ago

#4375 closed defect (fixed)

Potlatch 2: join nodes function creates duplicate nodes in ways

Reported by: Firefly! Owned by: potlatch-dev@…
Priority: major Milestone:
Component: potlatch2 Version: 2.0
Keywords: Cc:

Description

It seems to be a bug inside the Potlatch function "join nodes" (key J). When I stick together two (or more) areas by joining nodes, sometimes the OSM inspector tool tells me, I have created duplicate nodes in one of the resulting ways.
f.e.
http://www.openstreetmap.org/browse/node/1728680163
http://www.openstreetmap.org/browse/node/1706551424

I can reproduce it as follow:
Way 1 contains node 1a and node 1b. Way 2 contains node 2.
I join node 2 with node 1a. Later I join the resulting node with 1b.
After uploading I will get the duplicate node in way.

Normally this situation will not happen so often, but at edges of three or more areas you can have a lot of nodes and it is almost impossible to take care for all ...

Best regards

Change History (6)

comment:1 Changed 6 years ago by Oli-Wan

  • Priority changed from minor to major

This is actually a duplicate of #2501; the problem has been known for a long time. However, I can confirm that the procedure outlined above actually "works" and reproduces the error.

comment:2 Changed 6 years ago by stevage

I had trouble reliably reproducing this with these instructions. But I've fixed #2501, so it's pretty likely this is fixed too. Perhaps when this fix is in production, someone could verify and close.

https://github.com/systemed/potlatch2/pull/65

comment:3 Changed 6 years ago by Firefly!

Unfortunately it is still possible to create duplicate nodes with the decribed way, but I think the problem is more simple and follows a basically bug:

If you draw a closed way (f.e. for a landuse) you can see in the list of nodes mostly the first and the last node with the same ID.

f.e. http://www.openstreetmap.org/browse/way/164694686

(With my basic knowledge I can find in your bugfix 2501-source code sample only a check for two identical nodes after each other, but not for the case that first and last node are the same. And it seems that more than two identical nodes will also handled maybe incomplete...)

Best regards

comment:4 Changed 6 years ago by stevage

I'm not quite following - the first and last nodes of a closed way are *supposed* to be the same. That's how closed ways work. So ABCDA is ok. ABACDA is marginal but ok. ABACA is likewise marginal but ok. ABABA - no idea. AABCD is always wrong.

Do you have any instructions for producing an AABCD sequence with the patch?

comment:5 Changed 6 years ago by Firefly!

Sorry, it is as you said. I had to find out at a lot of other closed ways that the sequence ABCDA is correct.
This seems to be more a problem of the visualisation at http://www.openstreetmap.org/browse/way/* and specially for the start node A at http://www.openstreetmap.org/browse/node/* (f.e. "Part of: 123456789, 123456789") ...

About creation of other incorrect sequences like AABCD: I tried a lot variations now, but I could not reproduce it anymore. I will continue to observe it sometimes with OSMI, because in the last two months I did produce a lot of such duplicates. ...
By the way, also with Join-nodes it is possible to create a single node way -> see ticket 4378.

Thanks for your support and best regards!

comment:6 Changed 6 years ago by Richard

  • Resolution set to fixed
  • Status changed from new to closed

This appears to be fixed.

Note: See TracTickets for help on using tickets.