KML & GPX presets- invalid characters
See original GitHub issueHello,
Firstly- thank you for gopro-telemetry- I’m only getting started, but it seems very useful
When using the gpx & kml presets, the output contains invalid characters- for example in the KML file, \n
and \
characters
I can fix this by post-processing the output files, but how can I prevent this from occurring ?
thanks
Andrew
Issue Analytics
- State:
- Created a year ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Problem with navigation files (kml, gpx) to load from within
In the instance of using Google Earth, I have it set up to open both kml and gpx file by double clicking the...
Read more >qgis - Problems when converting KML files to GPX
Looking at the KML and the GPX file that I created (in QGIS through 'Save as'), in QGIS it looks as if the...
Read more >The KML file contains invalid or unsupported data, or the file is ...
A KML (as an XML file) must be well-formed and properly encoded. One issue in the KML file is one of the entity...
Read more >GPX Problems in Maps - Adobe Support Community - 8784378
I get my GPX file by converting a KML file from Google location history at https://kml2gpx.com/ . I've tried other converters and its...
Read more >GPS Visualizer Help
And Garmin files (GPX or .gdb) frequently have specific symbols attached to their waypoints. Whenever possible, GPS Visualizer will try to preserve the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see. Maybe the module is escaping those special characters under certain circumstances? It does not seem to happen on my end, but we can leave this open to keep an eye on it
Looking at the first screenshot, in addition to the \n you also have the escaped quotes \" It means you are using JSON.stringify to save the GPX data. However the GPX is in XML, not JSON, so it is incorrect to use the JSON.stringify.
While for full telemetry it looks like this (notice the fs.writeFileSync with JSON.stringify):
For the GPX it looks like this (no JSON.stringify):