{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreia2gsp43qp5cnlywahz3mc2xtx2bb6w3lbxs5uyqkxck2q7aq6pti",
"uri": "at://did:plc:4tuge3k3comfj4nfvqnwkemn/app.bsky.feed.post/3mkng2zcmynn2"
},
"path": "/user/Evgeny%20Arbatov/diary/408592",
"publishedAt": "2026-04-29T02:36:03.000Z",
"site": "https://www.openstreetmap.org",
"tags": [
"https://github.com/evgeniyarbatov/gpx-courses"
],
"textContent": "I often need to create a single GPX file from multiple related but different GPX files from Garmin and Wikiloc. My use case is finding route recommendations for running based on GPX files. I try to get a single GPX file so I do not have to juggle multiple files during the run. Original GPX files are also noisy, so the added advantage is having a precise path to navigate instead of dealing with GPX noise.\n\nI start by putting all downloaded GPX files into a single directory and plotting them on the map. This step allows me to see them in relation to each other and spot any outliers early. I then simplify each GPX file to reduce the number of points and match them to OSM ways. I filter the points to make them evenly spaced. Finally, I use the OSRM trip service to create a single combined GPX file, or fall back to the minimal number of split files if they cannot be merged into a single file. I plot the resulting GPX files and simplify them to reduce the point count. Now I can sync them to Garmin and use them as a kind of basemap on a device that does not support basemaps.\n\nOf course, this only works when I know the area in advance, can find enough existing route recommendations, and there is a reasonably complete OSM map. The current pipeline is error-prone and I find myself tweaking it to make it work with any specific set of GPX files. You can try it yourself and view the complete code on GitHub: https://github.com/evgeniyarbatov/gpx-courses",
"title": "Merge Multiple GPX Files to Create Basemap"
}