I have a bunch of GPX files and I want to find out which files contain tracks located in certain geographic extent, e.g. files containing tracks in Pennsylvania. Also, the inverse is also useful too, e.g. any file containing tracks not in USA. How to do this using any command line tool?
Gpsbabel's polygon filter looks like what I want. But for some reason I could not make it work. The filter does not filter anything. I am not sure whether the polygon filter works with track data. This is how I run it:
gpsbabel -i gpx -f infile.gpx -x polygon,file=test_bb.txt -o gpx -F outfile.gpx
Adding exclude
suboption to polygon filter does not make any different to the output as well.
polygonfile
syntax, which is a list of latitudes and longitudes, one latitude and longitude separated by space per line and the last line has to be the same as the first line (closed polygon).