drolbr / Overpass-API

A database engine to query the OpenStreetMap data.
http://overpass-api.de
GNU Affero General Public License v3.0
692 stars 90 forks source link

Scientific notation in export causes invalid GPX export #678

Closed BitScout closed 1 year ago

BitScout commented 1 year ago

When exporting the borders of France as GPX, one coordinate was so close to the 0th meridian that it was output in scientific notation.

My query:

[out:json];

area["name"="France"]->.country;
rel["name"="France"]["type"="boundary"]["admin_level"="2"];
(
way(r)["maritime" != "yes"]({{bbox}});
way(area.country)["natural"="coastline"]({{bbox}});
);

out body;
>;
out skel qt;

Relevant part of the export:

<trkpt lat="49.3267136" lon="0.0005797"/>
<trkpt lat="49.3264086" lon="-2e-7"/>
<trkpt lat="49.3261744" lon="-0.0005312"/>

Also see this thread: https://github.com/tyrasd/overpass-turbo/issues/588#issuecomment-1272307488

mmd-osm commented 1 year ago

As discussed, please close this one. The issue is with overpass turbo, NOT with Overpass API.

BitScout commented 1 year ago

Alright, I'm completely confused. I'll just close this, step back and let you do your thing.