[OSM-talk] Potlatch & duplicated node
Richard Fairhurst
richard at systemeD.net
Wed Aug 27 19:35:04 BST 2008
David Groom wrote:
> Whilst reviewing data I've noted recently a large number of duplicated
> nodes. These occur where one way joins another.
http://trac.openstreetmap.org/ticket/915
In short, the issue is that Potlatch creates a node with an (internal)
negative ID. When the way is written to the server, the server assigns
the node a new ID, and this is sent back to Potlatch. Potlatch then
renumbers (say) node -5 to node 2876515.
Unfortunately, this falls down if the server is running slowly (or the
user has an intermittent connection) and the user is working quickly.
If node -5 is shared by way A and way B, the user may upload way A,
and while the server is chewing on it, upload way B. Two separate
uploads, so two separate node IDs.
It's the single biggest bug there is in Potlatch and the only reason I
haven't fixed it yet is because it's a Hard Problem. Probably the
solution is to "chain" uploads so B won't finish until A has; maybe
the solution is to have some type of server-side persistence so that B
can look up "user x, session y, node -5" and get 2876515. The easiest
answer to code would be simply for the upload of B to check if a node
already existed at that lat/long, and if so to use its id, but that's
just horrid. I'd say "patches welcome", but more in hope than
expectation.
> I've managed to create a few myself, but have noted that many other
> users
> are doing the same. In each instance the relevant ways have
> "created by
> Potlatch" as tags.
Although it's appropriate in this case, remember that created_by is
not a reliable indicator to what editor was used to carry out the
edit, for this reason:
http://josm.openstreetmap.de/ticket/1047
and Potlatch's version number is in the created_by string for a
reason, please do quote it if you can. :)
On a general point, talk@ is not the Potlatch bugs reporting forum,
trac is, and my peculiar view of coding etiquette is that it's a
little more polite to contact the developer first rather than using a
public mailing list (and thank you very much to all those people who
do). I don't really mind too much, but experience shows people are
more likely to get defensive when problems are aired in public
initially, which can be counter-productive.
cheers
Richard
More information about the talk
mailing list