Problem submitting Nodes

HI guys,

I have problems submitting nodes, since API 0.6 :

This is what has worked some time ago (URL = “http://api.openstreetmap.org/api/0.5/node/create?_method=put” ):

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.5' generator='andnav2'>
    <node lat='49.4727480000' lon='8.6541070000' visible='true' timestamp='2009-06-01T22:29:22+0000'>
        <tag k='amenity' v='atm'/>
        <tag k='created_by' v='andnav.org'/>
        <tag k='name' v='sparkasse'/>
    </node>
</osm>

The following are what I tried today (URL= “http://api.openstreetmap.org/api/0.6/node/create” also with += “?_method=put” ):

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='andnav2'>
    <node changeset="1" lat='49.4727120000' lon='8.6541580000' visible='true' timestamp='2009-06-01T23:06:37+0000'>
        <tag k='amenity' v='atm'/>
        <tag k='created_by' v='andnav.org'/>
        <tag k='name' v='sparkasse'/>
    </node>
</osm>
<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' generator='andnav2'>
    <node version="1" lat='49.4726470000' lon='8.6542270000' visible='true' timestamp='2009-06-01T23:23:50+0000'>
        <tag k='shop' v='bakery'/>
        <tag k='created_by' v='andnav.org'/>
        <tag k='name' v='broooot'/>
    </node>
</osm>

I think the changeset and version attributes are a bit confusing … or am I missing something different?

Regards,
Nicolas

I’m no expert here, and am replying based on
http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.6

It looks to me like you need to
a) call the changeset create, which returns a changeset id
b) call the node create, using the returned changeset id from step (a) - returns node id (version should be 1 for new nodes, though can read node based on id to check)
c) repeat b) for maximum of 50,000 nodes in the changeset
d) call the changeset close command, perhaps after submitting changeset comments if not done with the create call

Editing gets a bit more complex as that involves returning existing version of node you’re updating to check it hasn’t changed in the meantime.

That was what I was fearing :frowning:

Can anyone verify this?

Regards,
Nicolas

Got it working now, just as EdLoach suggested.

AndNav2 is back with the Node-Adding in the next version. ( http://www.andnav.org )

Best Regards,
Nicolas