[OSM-dev] help on developing an editor
Etienne Chové
chove at crans.org
Sat Oct 31 17:52:11 GMT 2009
Sebastian Kürten a écrit :
> could someone please describe shortly, what actions are necessary to
> for example just changing a node's tags or inserting a new node?
> (or provide a link to the correct wiki-page i've missed)
!!! Make all your tests on http://api06.dev.openstreetmap.org/ !!!
Nota: All your requests should be authetified either with basic auth or
oauth.
You can read on http://fwd4.me/2Fs that you should :
1. open a changeset
http put to /api/0.6/changeset/create with payload :
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6">
<changeset>
<tag k="created_by" v="your_editor/0.1" />
</changeset>
</osm>
and read the changetid (result of the http request)
2. update a node
http put to /api/0.6/node/_NodeId_ with payload
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6">
<node id="_NodeId_" changeset="_CSId_" lat="..." lon="...">
<tag k="poi" v="your poi" />
</node>
</osm>
3. close the changeset
http put without payload to /api/0.6/changeset/_CSId_/close
You can also make many changes in one changeset, just close it at the
end of your session.
To create a node, put data to api/0.6/node/create (you'll get nodeid by
return).
Is that enough short and clear ?
!!! Make all your tests on http://api06.dev.openstreetmap.org/ !!!
--
Etienne
More information about the dev
mailing list