Open BitScout opened 2 years ago
Possibly relevant Overpass ticket: https://github.com/drolbr/Overpass-API/issues/514
Possibly relevant Overpass ticket: drolbr/Overpass-API#514
While I appreciate the initiative, it is unrelated.The issue there tell you that the Overpass API neither accepts nor emits scientific notation, and the issue here is about too much scientific notation.
There must be a step missing. The query produces ways and nodes, not XML elements of type trkpt
.
Ah, sorry, I should have included I'm going through https://overpass-turbo.eu/
Now the question is if that site's export function introduces the error or if it receives incorrect data from the API.
I’m pretty sure it’s caused by the overpass turbo gpx export function.
Overpass API has no code in place to return scientific notation for lat/lons.
By the way, you can easily reproduce the issue:
Query:
way(34386671);out geom;
Overpass API returns:
<nd ref="1904237890" lat="49.3267136" lon="0.0005797"/>
<nd ref="1904237751" lat="49.3264086" lon="-0.0000002"/>
<nd ref="1904237701" lat="49.3261744" lon="-0.0005312"/>
GPX export returns:
<trkpt lat="49.3267136" lon="0.0005797"/>
<trkpt lat="49.3264086" lon="-2e-7"/>
-> overpass turbo creates invalid GPX data.
Ah, sorry! And thank you for checking, I'll take this to https://overpass-turbo.eu/
You're already on the overpass turbo repo. No need to go anywhere else.
Oh. Yeah, I wasn't really sure if this repo was for the API and the website or both. I guess I'll stop writing that email then. :)
The API is over at https://github.com/drolbr/Overpass-API ... this repo is for the web frontend only.
Oh! I was reading this the wrong way round and understanding that the API returned correct results but the website was doing the GPX conversion.
That's correct, the API returns correct results, the GPX conversion is done by the website. The website code introduces the error.
Oh dude, you're messing it all up. Can you please close the Overpass API issue again?
Sorry, didn't see your comment while writing the other ticket.
So the issue is really in one of the libraries used by overpass turbo: https://github.com/tyrasd/togpx/blob/master/togpx.js
That's ok, just leave this issue open, and as it is right now.
Possibly needs to be forwarded to https://github.com/drolbr/Overpass-API but I'm not sure:
When doing an export of the borders of France I got invalid GPX code as one coordinate was so close to latitude 0 that it was exported in scientific notation:
My query:
Edit for context: I was trying to import the file into Maperitive v2.4.3