4

I have a GPX file, which I'd like to import in Google Maps. Google Maps can only import GPX files up to 5 MB. How can I subsample my GPX file to compress it into a target file size (in this case, 5MB minus epsilon)?

I don't want to split the GPX file into several files.

1
  • Try using the simplify filter on GPS Babel? Will require trial and error as it works on data not dataset size.
    – Hornbydd
    Jul 23, 2022 at 0:06

1 Answer 1

4

As pointed out by others already, the easiest way is to simplify the geometry.

  • If you are familiar with using freeware such as QGIS you could use the follwoing toolProcessing > Toolbox > Vector geometry > Simplify. This will reduce the number of nodes, you can set thresholds etc. Likely, you would need to try around to find the amount of simplification that is necessary to reach the desired file size. enter image description here

  • If you are not familiar with such software, there are online tools you could use, just google for "GPX geometry simplification" or so. E.g. gpx-simplify-optimizer lookes good at a first glance. I used an example track and reduced it from 281 to 18 nodes, thereby reducing the size from 23.3 to 2.1 kb.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.