I have a MultiLinesString layer in a geopackage that I want to import to a Garmin GPS as a track. I exported the layer from QGIS as a .gdb. However, it's too long to import to the GPS (~2500 points, limit is 500 points.) I try to simplify it using gpsbabel:

gpsbabel -i gdb -f ContDiv.gdb -x simplify,count=475 -o gpx -F ContDiv3.gpx

The output contains all the original points, all 2500 of them. The first sentence of the simplify docs say that the simplify option simplifies routes and tracks, but then the rest of the docs only says routes. Is my problem that gpsbabel only simplifies routes, not tracks?

Is there an alternate pathway from geopkg to gpx or gdp that will simplify the line string into a Garmin track, perhaps using QGIS? I know the processing toolbox has a simplify operation, but that is based on distance error, so it's a matter of hunt and peck to find a parameter that reduces the line string to 500 points.


It's necessary to include the -t option to force simplify to operate on tracks:

gpsbabel -t -i gdb -f ContDiv.gdb -x simplify,count=475 -o gpx -F ContDiv3.gpx

Note that your coordinates should be in EPSG:4326, and the track should be a single segment.


QGIS has the Subdivide tool, which will split the track into separate tracks with no more than the specified number of vertices.

Subdivides the geometry. The returned geometry will be a collection containing subdivided parts from the original geometry, where no part has more then the specified maximum number of nodes.

It's not exactly what you asked for, but it might be useful for you or someone with a similar issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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