I am using my GPX files in photo and video processing, and at times need to back track to older archives. I have currently blended all my GPX files into a combined archive, but this is now too big, so that many of the tools I am using are unable to find the data. I am therefor looking for a tool or shell commands I can use to split the combined archive into monthly files (or if that is still too big, daily files) That way I don't have to look through my entire database in order to find the correct traces. gpsbabel might be possible, but filtering is still confusing for me. asked 09 Jan '16, 22:10 Skippern |
gpsbabel can do the low-level filtering for you, but it is a bit awkward, especially if your GPX file has more than one data type (route, track, or waypoint). You would then have to wrap this in a script to process by month or day or whatever. Here are some examples. If you have a GPX file of only tracks, and you want only tracks from the year 2014 (2014-01-01 to 2015-01-01), you could use something like this: gpsbabel -i gpx -f in.gpx \ -x track,start=20140101,stop=20150101 \ -o gpx -F out.gpx Make sure none of your tracks crosses the start or stop date/times, because gpsbabel filters the trackpoints (not the tracks) by trackpoint date/time, and you will end up with partial tracks. If your GPX file has only waypoints, you have to transform them to use the filter: gpsbabel -i gpx -f in.gpx \ -x transform,trk=wpt,del \ -x track,start=20140101,stop=20150101 \ -x transform,wpt=trk,del \ -o gpx -F out.gpx If your GPX file has both waypoints and tracks, you have to run 2 passes, once per type. Then merge the results (if desired). gpsbabel -i gpx -f in.gpx \ -x nuketypes,tracks,routes \ -x transform,trk=wpt,del \ -x track,start=20140101,stop=20150101 \ -x transform,wpt=trk,del \ -o gpx -F out_w.gpx Doing this for routes 'is left as an exercise for the reader'. answered 10 Jan '16, 23:33 ljb_nj |