This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Get GPX file of a trajectory from openstreetmap programmatically

-2

I want to ask if I can get the gpx file of a trajectory from openstreetmap using and an api that run under Android platform. I have the source and the destination, so to plot the shortest path between these two points I need the gpx file of this trajectory. Thank you :)

asked 11 Feb '13, 09:44

Yahya_Romdhane's gravatar image

Yahya_Romdhane
25101014
accept rate: 0%

edited 11 Feb '13, 09:58

2

So basically you want a GPX file with 2 nodes: source and destination. Well...I don't see the problem.

Just look at the spec at http://www.topografix.com/GPX/1/1/ and write the file yourself.

(11 Feb '13, 15:29) gormo
1

This is not the problem, I'm searching if a routing engine can gives me the calculated way between 2 geopoints in a GPX file. After surfing in the internet, I found that MapQuest and Cloudmade have both webservice api that allows developer to get such informations programmatically. For OSRM it's provides restful webservices but it doesn't return the gpx file of the calculated shortest path.

(11 Feb '13, 16:12) Yahya_Romdhane
2

You already asked lots of rather similar questions. Please start using the wiki search function. There is a list of online routers with a GPX export row.

(11 Feb '13, 18:50) scai ♦

I visited already this. Thanks anyway

(12 Feb '13, 13:44) Yahya_Romdhane
1

And why does none of those services featuring GPX export work for you?

(12 Feb '13, 17:27) scai ♦

For MapQuest and Cloudmade they limit access because the have business editions

(13 Feb '13, 09:20) Yahya_Romdhane
1

And the others mentioned on the wiki; or how about bying the business access if you want to build a commercial application?

(13 Feb '13, 15:37) gormo
showing 5 of 7 show 2 more comments

Source code available on GitHub .