Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export and import of gpx is inconsistent #1932

Open
Spielmops opened this issue Jun 23, 2024 · 6 comments
Open

Export and import of gpx is inconsistent #1932

Spielmops opened this issue Jun 23, 2024 · 6 comments
Labels

Comments

@Spielmops
Copy link

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

@Spielmops Spielmops added the bug label Jun 23, 2024
@yohanboniface
Copy link
Member

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 pnlabs/togpx#1 on this topic

Needs more investigation!

@yohanboniface
Copy link
Member

yohanboniface commented Jun 25, 2024

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
Copy link
Contributor

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

I would say the = within the description is unfortunate.

@yohanboniface
Copy link
Member

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
Copy link
Author

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

@yohanboniface
Copy link
Member

A new release has been deployed just now that changes the lib used for GPX. Could have a try ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants