GPSBabel / gpsbabel

GPSBabel: convert, manipulate, and transfer data from GPS programs or GPS receivers. Open Source and supported on MacOS, Windows, Linux, and more. Pointy clicky GUI or a command line version...
https://www.gpsbabel.org
GNU General Public License v2.0
452 stars 125 forks source link

GPSBabel doesn't seem to filter points by date/time bounds #1261

Closed jasiek closed 4 months ago

jasiek commented 4 months ago

When I run:

gpsbabel -t -i gpx -f every10m.gpx -o gpx -F output.gpx -x track,start=20230720,stop=20230721

I get the same file as the input file with the only difference being the metadata/time element being set to the current timestamp. When stepping in with a debugger, I can see that the function in trackfilter.cc gets hit and each point is being evaluated correctly for inclusion in the time range. Given no one else has reported a similar problem, the only explanation left is that I'm making an obvious mistake somewhere.

Input file in question: every10m.gpx.gz

tsteven4 commented 4 months ago

the command line is processed from left to right, so you need to output after you filter: ./gpsbabel -t -i gpx -f every10m.gpx -x track,start=20230720,stop=20230721 -o gpx -F output.gpx

tsteven4 commented 4 months ago

see https://www.gpsbabel.org/htmldoc-1.9.0/Invocation.html, search for "Options are always processed in order from left to right."

jasiek commented 4 months ago

🤦🏻

Thank you.