[suggestion] Add "Download route as GPX" to osm.org

Hello,

After creating a route in www.openstreetmap.org, the site has a link that says “Download route as GeoJSON”.

Since GPS applications often use GPX, I suggest adding that option.

Cheers,

1 Like

Discussed at Allow exporting direction path tracks · Issue #5224 · openstreetmap/openstreetmap-website · GitHub

3 Likes

In short Leaflet, which powers the route visualisation, natively supports GeoJSON output, so it can be directly passed onto the user.

Supporting GPX or KML means needing to disassemble and reassemble the route, and bringing all the tools to do that.

In the short term graphhoppers website has that option.

Previously, a simple gpx test track download was possible.
With neither .json nor .geojson you can hardly do anything.
”This format seems to be just fine for the nerds maybe”
Universal simple to use does not appear to be the case.

With neither .json nor .geojson you can hardly do anything.

you can display it on a map or convert it to gpx, for instance…

It used to be readily available as simple gpx track.
None of the popular GPS apps read this format.
It appears that it is not even applied uniformly.
Wow, convert before use. Very convenient.

@Richard

The cycle route planner even ask import as gpx only.
While .json may be a fine tool for dev’s, it is less obvious for app/gps users.
tcx, fit, gpx, kml, json geojson and who knows still what else to come.

Thumbs down? You could also contribute more helpfully.
The osm export is apparently false because of the .json extension.
Change into .geojson and successfully import into Guru Maps.

Thumbs down was because your sarcastic response (“Wow, convert before use. Very convenient.”) was unhelpful to a volunteer-run project and not likely to convince anyone to scratch your particular itch.

3 Likes

To elaborate, the directions functionality on the site is primarily intended for helping mappers ensure that the map data is suitable for navigation and debug any issues that arise, whereas exporting the route is primarily useful for end users to navigate with. GeoJSON data was already readily available, so that was easier to justify, whereas GPX would’ve required developing a solution for each of the three supporting routing engines.

Fortunately, GPX export functionality is already available on the respective routing engine’s own demo page. I’ve proposed to make the demo pages more discoverable:

It should be a small change:

1 Like

All here are volunteers. Once the problem found, it is usually simple. The previous osm gpx export was problem-free. Many apps import gpx as opposed to .json files. This situation is not simple for contributors.I had noticed the fake file extension. (So the export was not tested). An extension change did not bring success. Turns out that the used test app failed after an update (yes), this is now reported. Conversion can’t work given the fake .json extension. I finally found Guru maps. The file with extension .geojson does import. Provided you find a suitable app, you see the track.What do I know more now? A file.json is not intended for transfers between apps. Turns out that only.geojson files should be interchangeable.

The files used for a test.

For walking or cycling routes I rarely find A to B routing useful. Particularly as 90% of walking routes I use are circular.

To make them useful I need to be able to add via points.

Graphhopper.com uses OSM data, allows vias and has an export to gpx. I am not sure the feature is that important for OSM.org, which is a demo map for mappers.

3 Likes

How difficult is it to convert a .geojson file to gpx?

I’d say it’s not difficult at all, considering the vast number of web tools and apps that can do it with just a couple of clicks.

.geojson is the perfect format for the OSM mapping environment, easy to implement, simple to write and understand and even easier to view and convert.

A partial fix for this issue has been deployed: if you download the file on macOS, it saves with a .geojson extension. A more comprehensive fix for Windows and Linux is on its way.