Archive | geocaching
Geocaching — Linux Style
I’ve been hearing and reading a lot about GSAK but it’s not open source and, maybe more importantly, not on Linux. So I simply googled “linux geocaching” and got to the geo-* tools. They are a set of shell scripts in the public domain — not, not GPL’d, really in the public domain.
These scripts are quite cool — if you are a command-line junky like myself. As the README says they take the clicky-clicky out of the task of finding waypoints. Now I’m able to type this:
geo-nearest -s -f
And the script will go to geocaching.com, get get the 20 nearest caches that I haven’t found yet. Since it uses GPSBabel, I should be able to send it directly to my GPS from that command. There are also scripts that can also display a map of waypoints.
Very cool stuff.
There are other scripts that map out waypoints, etc.
Mapping my cache density
This little project was started by this post on the GPSBabel mailing list. I asked him how he rendered the map and he told me (off the list) that he used Mapserver’s shp2img utility. I didn’t have Mapserver installed, and don’t want to at this point. And, I assume, I had to get it into a shapefile first anyway.
I grabbed my copy of Mapping Hacks and, sure enough, Hack #92 described how to get data into a shapefile — using shapelib of course! As I looked at the page, I discovered that shapelib has a Python extension. Alright, this is getting better!
PyShapelib has very little documentation. To compile it, I had to untar shapelib, and then unzip PyShapelib in a directory underneath it — after that, I just did a “python setup.py install” and it all worked.
As I said, there is very little documentation for PyShapelib, but there is a good example of the basics in the pytest.py file. This explains how to open a read a shapefile as well as it’s corresponding dbf file. Using it as a guide, I was easily able to take the gpsbabel county data for Nebraska to make a map of the counties as well as using the gpsbabel command in the email post that started all this and poof — I had a shape file. Here is the Python script that does the voodoo.
Okay, so now I have a shapefile. So what? I imported it into Quantum GIS and, rendered a map of Nebraska with all the counties I’ve cached in.
Um, not a very exciting map, is it? Well, I seem to have only geocached in one county in Nebraska (though I do have some out of state caches). This map should change this weekend! ( I hope!) And, really, all of this isn’t bad for a couple hours of work.
Geocaching Quickies
Some quickies:
- Yesterday, I got a copy of the Podcacher podcast and then I listened to another on the way home from work. It’s pretty good, though a bit syrupy.
- Today, I finally ended my two-month long dry spell by grabbing River Bridge II over lunch. I started off a little chilly but by the time I got back, I has to take my jacket off! On the way back to the office, I grabbed a couple more quick ones.
- Two things I am adding to my “caching essentials”: a fine, felt tip pen, which is good for writing on wet log and a map of the Omaha Trails. I have the electronic copy, but I’m going to put a hard copy in my caching bag (looking at the map before heading out today saved me much frustration!).
TerraCaching
I was curious if there were any other quality geocaching sites out there besides the famous Geocaching.com. I stumbled onto what maybe their #1 competitor which is TerraCaching. TerraCaching seems to be for “serious” cachers — I say this because you need to have two sponsors before you can join.
This is a good way to form an elitist club — not build a community. What if I don’t know two people that can sponsor me? How do I know if being a member is worth it considering I can do nothing if I don’t have a login – except look at their map (which is pretty cool).
Introducing geocode_pic.py
I wrote this script as a response to Hack 10 in the most-excellent Mapping Hacks from O’Reilly. I named it geocode_pic.py and it takes a directory of JPEGs and a GPS tracklog and tries to list out what coordinates each picture was taken at.
It hasn’t been tested extremely well, but it works well in my enivironment. I’m looking for feedback to see how it works for others!
It requires :
- Python 2.4 (because that’s all I tested it with!)
- Python Imaging Library 1.1.5
- path.py
More info can be seen by doing a “pydoc geocode_pic”.
This script works by taking the DateTime from the JPEG’s EXIF metadata and the time from each trackpoint and try to match them up. You can give the script a “timedelta” in hours. This means that every photo taken timedelta hours past a point from the tracklog it to count as from that point. Of course, if your camera is quite off from your GPS, will you have problems. It also assumes that the DateTime from the JPEG is in your timezone and the tracklog time is in UTC (which is what the schema says it should be!). Variences from that will cause problems.
What to do with this data? You could make a Google Map application. I’m thinking about hacking something into our gallery.
