Geocaching and Route Planning - Part 1
Planning a out of town trip and want cache along the way but you don't want to go too far off the beaten path? GPSBabel with it's DISTANCE ALONG A ROUTE (ARC) data filter can ease the pain of planning.
The ARC data filter as defined in the GPSBabel documentation: "The arc filter is designed to include points based on their proximity to an arc, which is a series of connected line segments similar to a route or a track but without any associated data other than the coordinates".
The file format of the ARC filter consists of multiple lines containing the latitude,longitude in decimal degrees format. Each line represents a waypoint along the intended route. Here is a example:
- 30.263395 -97.736603
- 30.170444 -97.784180
- 30.076534 -97.824013
- 29.962502 -97.878235
- 29.876257 -97.932457
- 29.712395 -98.089577
- 29.619442 -98.251129
- 29.532240 -98.389442
- 29.457495 -98.410461
- 29.435455 -98.493454
According to the Chief Babel-Head, Robert Lipe, GPSBabel is sensitive to the order of the waypoints. Further investigation needs to be done to see the effects of a non-progressive route.
To better illustrate the process, we will use an example:
We plan on taking a trip from Austin, Texas to San Antonio, Texas via Interstate 35. We also want to cache along the way but do not want to go more than 2 miles off of I-35. The above coordinates represent our route. Save the coordinates into a file called AustinSARoute.arc or download it here.
This is a picture of our route:
We also have a Geocaching.com pocket query of the caches in the Austin and San Antonia area. You can download the gpx file named all.gpx here (File removed due to TOS agreement at gc.com) .
This is a picture of the caches from the pocket query:
Now we are ready to execute our command:
gpsbabel -i gpx -f all.gpx -x arc,file=AustinSARoute.arc,distance=2M -o gpx -F route.gpx
The command reads in a gpx type file (-i gpx) called all.gpx (-f). It applies the arc filter (-x arc) from the file AustinSARoute.arc for 2 miles (distance=2M). It then outputs the data in gpx format (-o gpx) to a file called route.gpx (-F).
This is a picture of the filtered caches:
You also can download a copy of the new gpx file here (File removed due to TOS agreement at gc.com).
In part 2, we'll look at automating the process using the Mapsend and/or Mapsource software.