[Gpsbabel-misc] Counting the number of waypoints in a file
Brought to you by:
robertl
From: <gps...@ro...> - 2005-01-20 08:48:19
|
Hi, I am working with some geocaching Pocket Queries, and was trying to find an easy automated way to count the number of waypoints in a GPX file. The best solution I have come up with so far is to convert the file to csv, and then count the lines in the file using a batch file like this. gpsbabel -i gpx -f %1 -o csv -F countTemp.csv set cacheCount=0 for /F %%i IN (countTemp.csv) DO SET /A cacheCount+=1 del countTemp.csv echo there are %cacheCount% waypoints in %1 This led me to an idea, could we have a output format called stats, that returns some statistics on the waypoints currently loaded rather than the actual waypoints. If possible in a computer readable way (comma separated one value per line). E.g. WaypointCount,22 RouteCount,0 So far the only statistics that I can come up with that might be useful are Counts (of all the object types) Bounds MinLat MaxLat MinLon MaxLon I am sure that there might me more. What do people think? Useful? Waste of time? Or is it already there and I am missing it? Robert |