[OSM-dev] API v0.5 and gpx traces upload
Danilo Abbate
danilo.abbate at gmail.com
Fri Jul 25 11:21:38 BST 2008
Hi all,
I'm writing my own python script to upload gpx traces using API v0.5
but i'm finding some problems. I did a search but i only found threads
which apply to API 0.4. So, here it is what i'm doing.
On the wiki [1] it's written that one should upload traces sending the
"following POST parameters in a multipart/form-data HTTP message":
- file (The GPX file...)
- description
- tags
- public
But when I keep on getting a 500 Internal Server Error. I had sniffed
the traffic generated while uploading traces through my page on
openstreetmap [2] and i see that the parameters send to the server are
the following:
name="trace[gpx_file]" filename="trace.gpx"
name="trace[description]"
name="trace[tagstring]"
name="trace[public]"
and this parameters are sent, of course, to a different URL
http://www.openstreetmap.org/trace/create.
Is there anyone who can clarify how to correctly use the POST API
(maybe with a working example?), or at least to know if the API is not
working? Here [3] I found a Perl example, but i can't get it to work
:(
Thank you all in advance.
Ciao,
Danilo
[1] http://wiki.openstreetmap.org/index.php/OSM_Protocol_Version_0.5#Methods_for_GPX_Traces
[2] http://www.openstreetmap.org/traces/mine
[3] http://wiki.openstreetmap.org/index.php/Batch_Upload#Uploading_via_the_API
More information about the dev
mailing list