NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi, I would like to use iD in my web application to improve GPX file, the idea is simple :

  • User import GPX file into iD
  • GPX trace is converted into editable route path
  • The User edit this path with iD tools
  • Then the user can export his modification to new GPX file.

So I started a local instance of iD but I would like to add an "export to GPX" feature and remove all the defaults paths. Is anybody have an idea of how to start ?

asked 25 Sep '15, 11:08

alex3165's gravatar image

alex3165
26114
accept rate: 0%

edited 28 Sep '15, 20:25

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


So it sounds "doable" - but as always...it is just a question of what you are trying to achieve.

If one just wanted to convert (many) GPX track nodes into a simple route then something like GraphHopper might be sufficient to get nodes onto the OSM graph.

As for converting the GPX into something iD can work with you are probably best heading over to the iD github repo to request an enhancement. The folks over there will no doubt be able to provide better feedback than on this forum.

permanent link

answered 27 Sep '15, 23:01

snodnipper's gravatar image

snodnipper
126459
accept rate: 0%

Check out http://geojson.io/, it is probably a better fit for what you are trying to do than iD.

permanent link

answered 28 Sep '15, 02:00

bhousel's gravatar image

bhousel
2.1k12528
accept rate: 38%

1

Effectively GeoJSON file format is better than GPX but I wanted to be able to edit path once it is displayed and for this feature iD seemed pretty good but finally I solved my issue using just Leaflet Draw : https://github.com/Leaflet/Leaflet.draw

(28 Sep '15, 08:43) alex3165

Thanks for your reply I achieved my goal, iD was not exactly what I was looking for. I used Mapbox to display a map and Draw functionality from Leaftlet to make my path editable then I wrote an algorithm that merge displayed path with GPX points to create my final GPX.

permanent link

answered 28 Sep '15, 08:36

alex3165's gravatar image

alex3165
26114
accept rate: 0%

1

thanks for your follow-up! Do you mind freeing or at least showing your code? Others may be interested.

(28 Sep '15, 20:29) aseerel4c26 ♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×301
×255
×113

question asked: 25 Sep '15, 11:08

question was seen: 3,781 times

last updated: 28 Sep '15, 20:33

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum