[OSM-dev] Relations error with JOSM/API

Dave Stubbs osm.list at randomjunk.co.uk
Sun Oct 28 15:44: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.

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.

JOSM outputs this to stdout when trying to upload:

upload to: http://www.openstreetmap.org/api/0.5/relation/create
got return: 500 with id 0
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.5' generator='JOSM'>
  <relation id='0' visible='true'>
    <member type='way' ref='4784249' role='' />
    <member type='way' ref='10498537' role='' />
    <member type='way' ref='10498534' role='' />
    <member type='way' ref='10498536' role='' />
    <member type='way' ref='4992596' role='' />
    <member type='way' ref='10498541' role='' />
    <member type='way' ref='10498542' role='' />
    <member type='way' ref='10498525' role='' />
    <member type='way' ref='10498525' role='' />
    <member type='way' ref='10498526' role='' />
    <member type='way' ref='10498526' role='' />
    <member type='way' ref='10498540' role='' />
    <member type='way' ref='4061597' role='' />
    <member type='way' ref='10498528' role='' />
    <member type='way' ref='4071136' role='' />
    <member type='way' ref='10498530' role='' />
    <member type='way' ref='10498529' role='' />
    <member type='way' ref='10498533' role='' />
    <member type='way' ref='10498532' role='' />
    <member type='way' ref='4060863' role='' />
    <member type='way' ref='10500143' role='' />
    <member type='way' ref='5045554' role='' />
    <member type='way' ref='5045525' role='' />
    <member type='way' ref='6144397' role='' />
    <member type='way' ref='8118033' role='' />
    <tag k='created_by' v='JOSM' />
    <tag k='ref' v='25' />
    <tag k='route' v='bicycle' />
    <tag k='type' v='route' />
    <tag k='network' v='lcn' />
  </relation>
</osm>

java.lang.RuntimeException: 500 Internal Server Error
        at org.openstreetmap.josm.io.OsmServerWriter.sendRequest(OsmServerWriter
.java:192)
        at org.openstreetmap.josm.io.OsmServerWriter.visit(OsmServerWriter.java:
122)
        at org.openstreetmap.josm.data.osm.Relation.visit(Relation.java:25)
        at org.openstreetmap.josm.io.OsmServerWriter.uploadOsm(OsmServerWriter.j
ava:73)




More information about the dev mailing list