umap-project / umap

uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
https://umap-project.org
Other
1.05k stars 213 forks source link

Export and import of gpx is inconsistent #1932

Open Spielmops opened 5 days ago

Spielmops commented 5 days ago

I create an item in a map-layer: testdaten nach Eingabe

Then I export this item as gpx and look at it via editor: Testdaten als GPX-Datei

And after that I import this file. Result: Testdaten als GPX-Import

Why is this so? Why is the description not in description-field any more?

Spielmops

yohanboniface commented 4 days ago

Thanks for the report!

Not sure exactly about the status of the external lib we current use for exporting to gpx: https://github.com/tyrasd/togpx See also https://github.com/pnlabs/togpx/pull/1 on this topic

Needs more investigation!

yohanboniface commented 4 days ago

Maybe switch to https://github.com/We-Gold/gpxjs ?

Edit: this lib is the other way (parsing)… For creating: https://github.com/dwayneparton/geojson-to-gpx

davidbgk commented 3 days ago

Why is this so? Why is the description not in description-field any more?

I would say the = within the description is unfortunate.

yohanboniface commented 3 days ago

From the togpx doc:

By default, the desc tag of GPX elements will be constructed by concatenating all respective GeoJSON properties.

So this is the expected behaviour. It's configurable, but from the specs it seems there is no way to have custom properties, only desc is expected (if I read it correctly). So we can either keep the current behaviour, so all properties are exported in the GPX, either have a custom configuration to export only the description field into desc.

First thing to decide: I wonder how other GPX tools behave, and specifically how other tools would load a GPX concatenating many properties in the desc field.

Spielmops commented 21 hours ago

I would say the = within the description is unfortunate.

Even if I reduce in that gpx-file to <desc>Und hier steht die Beschreibung des betreffenden Objektes.</desc> the content of <desc></desc> is not imported to "description", where I expect it.

Spielmops