[OSM-talk] Relation 412 errors / database inconsistency
Frederik Ramm
frederik at remote.org
Thu Mar 20 19:51:54 GMT 2008
Ben, all,
> I keep having 412 errors when trying to modify a certain route relation
> (id=3964, runs from Antwerp to the Netherlands in Belgium). It's quite
> a long route relation so I don't immediately see where the problem is,
> just the 412 error on the terminal (which JOSM doesn't detect btw, it
> thinks it uploaded successfully).
I have debugged the relation and found that it uploads ok if you
remove the following two references from it:
<member type="way" ref="19580495" role="forward"/>
<member type="way" ref="19580499" role="forward"/>
Include any of these and the attempt to upload returns a 412 error.
Turns out that these two ways are broken in a very ugly way that I
hope TomH will have a chance to look at some time:
http://www.openstreetmap.org/api/0.5/way/19580495
<osm version="0.5" generator="OpenStreetMap server">
<way id="19580495" visible="true" timestamp="2008-03-19T20:56:57+00:00" user="Eimai">
<tag k="bridge" v="yes"/>
<tag k="cycleway" v="track"/>
<tag k="highway" v="cycleway"/>
<tag k="created_by" v="Potlatch 0.7b"/>
<tag k="layer" v="1"/>
</way>
</osm>
(Note way was no nodes!)
If you retrieve the way history, however, you see that all three
historic versions *do* have two or three nodes. So we have a situation
where the "current" way is different from the most recent in the
history table. This should never happen.
Same with way 19580499, it has two nodes in both historic versions but
only one node in the "current" table.
I'm not really sure why the relation code chokes with a 412 here, I
thought it should just check for the existence of the ways and not
whether they're valid, but once your database is inconsistent, all
sorts of strange things happen. - The relation should be ok now after
I have dropped references to the two broken ways, but there might just
be other broken ways in the vicinity so watch out!
Bye
Frederik
--
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the talk
mailing list