[OSM-dev] Relations error with JOSM/API
frederik at remote.org
Sun Oct 28 16:29:44 GMT 2007
> I'm getting an error trying to create a new route relation with JOSM.
> I resolved this by deleting some duplicte members (way 10498525 and
> 10498526 appear twice) and trying again.
> I'm not sure whether this is a problem that JOSM shouldn't allow this,
> or whether it's a problem in the API.
There is a unique key on the relationship member table that prohibits
inserting the same element twice into the same relationship (unless it
has different roles, that is).
I guess that raises an exception upon trying to store the object, the
exception is not caught, and this results in an error 500. We should
perhaps catch the exception and then return some other, more
meaningful, error. I'll fix it because I'm responsible for the sloppy
implementation but what would be a suitable return code?
> The other thing I'm not sure about is how these duplicates got in
> there -- it may be user error, but I noticed it was more likely to
> happen when I was splitting ways to make up the route. I think this
> confuses JOSM sometimes.
Well JOSM should definitely not allow that, no matter how hard the
user tries ;-)
I'll experiment with splitting ways and see if I can reproduce the
Frederik Ramm ## eMail frederik at remote.org ## N49°00.09' E008°23.33'
More information about the dev