[Announce] gpxgrep

Donald Campbell II donaciano2000 at gmail.com
Mon Feb 8 02:31:00 GMT 2010


Greetings all OSM mappers!

Ever wanted to take a look at all the tracks you've ever done in a
particular area... but your editor couldn't handle that many gpx files
without getting too slow?

Ever go through a street that's not on your GPS and go "Hey wait, I
*KNOW*I've been here before!"?

Ever try to remember which day or gpx file that one track is in?

Want to find trackpoints based on elevation or in a specific bounding box?

Grep a GPX file and then handmake a new file to put those points in?

I wanted to do those things... and I couldn't couldn't find a utility for
it.    Maybe my googling skills aren't up to snuff and I missed it but... oh
well, now you have gpxgrep.

How is it better than grep?  Well it creates a gpx file and puts all the
trackpoints and waypoint you want inside it.  A valid GPX file you can drop
in JOSM or whatever to play around with... but you probably shouldn't upload
them to OSM.  :-)

Here's an example:
./gpxgrep 4.3432 -54.343 4.4003 -54.405 ~/Tracks/*.gpx > mybox.gpx

There's also an elevation option that takes two numbers and returns all
points or waypoints within that elevation range.
./gpxgrep 4 -5 4.1 -5.1 -e -99 0 ~/Tracks/*.gpx > belowsea.gpx

Perhaps useful to hikers?

----------
This is alpha level stuff, it works most of the time but sometimes doesn't
create a new track segment when points go past the bounding box, so you get
some lines around the edges.  I also need to add comment searching.  So fool
around with it, let me know what you think and send suggestions.

http://sourceforge.net/projects/gpxgrep/

I'll be refactoring when I get a chance, the code is ugly but I've held onto
it too long and need to release something so here it is.

-Don.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/announce/attachments/20100207/1ff1180d/attachment.html>


More information about the Announce mailing list