fix(gpx): replace regex parsing with fast-xml-parser and import tracks alongside waypoints

GPX files containing both <wpt> and <trk> elements would only import
waypoints, silently discarding track geometry. The fallback chain only
parsed <trkpt> when no waypoints were found.

Replaced all regex-based XML parsing helpers with fast-xml-parser for
correctness (namespaces, CDATA, attribute ordering). Tracks are now
always parsed independently of waypoints, with each <trk> element
becoming its own place with route geometry. Fixes #427.
This commit is contained in:
jubnl
2026-04-05 15:54:26 +02:00
parent 58874a1ccb
commit 6ba08352ed
3 changed files with 108 additions and 65 deletions

View File

@@ -21,6 +21,7 @@
"cors": "^2.8.5",
"dotenv": "^16.4.1",
"express": "^4.18.3",
"fast-xml-parser": "^5.5.10",
"helmet": "^8.1.0",
"jsonwebtoken": "^9.0.2",
"multer": "^2.1.1",