Planning and Recording an Adventure

I’m using this post to document how I record the adventures that I post in this blog.  As an engineer, I enjoy technology.  I also enjoy history, and the history of technology.  Electronics is changing so fast these days, that it will be fun in the future to see how I recorded adventures back in 2011.  If anyone reads this blog, it may help them as they develop their own methods.

I follow three general steps:

  1. Plan the Adventure
  2. Record the Adventure
  3. Document the Adventure

Plan the Adventure

These days, my adventures are constrained to be close to home.  Fortunately, Albuquerque has a lot of opportunities for outdoor adventures, which are my preferred kind.  Together with my son Richard, we do a lot of hiking, and some canoeing.  Richard is not into biking, so I do those adventures solo or with other friends.

To help plan hikes, I bought two hiking guidebooks.

  • 60 Hikes Within 60 Miles: Albuquerque, including Santa Fe, Mount Taylor, and San Lorenzo Canyon, by Stephen Ausherman, 2008, Menasha Ridge Press.  www.menasharidge.com
  • Sandia Mountain Hiking Guide, by Mike Coltrin, 2005, University of New Mexico Press.  www.sandiahiking.com

There is no hint in the book, but Sandia Mountain Hiking Guide has a complementary web site, at which all the GPS waypoints and tracks mentioned in the book are available for download.  60 Hikes does not have a similar site, though Trails.com does feature hikes from the book.  However to access the GPS data (beta) requires a paid membership to Trails.com.

Because my GPS equipment is made by Garmin, I use the free application Garmin BaseCamp to plan outdoor adventures.  The first step is to locate some strategic waypoints along the planned route.  I select the Trailhead/Parking Area, a few turns along the path, and the end point.  SMHG makes it easy by downloading GPX files from the web site.  60 Hikes only includes the trailhead as written GPS coordinates in the book, and I have to key these in.

My setup of BaseCamp does include a topo map that I bought from Garmin.  This adds a lot more detail, including trails, than the free base map that comes with the application.

When the waypoints and route are to my satisfaction in BaseCamp, I connect my handheld GPS receivers and download the information to the units.  Richard usually carries the older GPSMap 76C and I clip the Oregon 400t to my belt during the hike.

Record the Adventure

Two questions need to be answered to record the adventure:

  1. Where did I go?
  2. What did I do?

My GPS receiver records where I went, and when.  I set it up to always record tracks, so there is no issue of forgetting to turn on tracking.  Recording is passive, so the only setup required is to ensure there are fresh batteries in the unit.

I use photographs to record what I did.  Mostly Penny, my Pentax K20D, but sometimes the iPhone.

I like to record where each photo was taken, and that means geotagging each photograph.  This happens during the Document phase, but the task is much easier if the clock in the camera is synchronized to GPS time.  So I check the camera time to ensure it is within 1 second of GPS time.

Document the Adventure

This is the most time-consuming part of the adventure.  I follow these steps:

  1. Retrieve GPS tracks and digital photos from the equipment and store as files on computer hard drive.
  2. Geotag the photos with the location they were taken.  This involves comparing the GPS track recorded by the GPS receiver with the time stamp on the photo image file.  The GPS location at the time closest to the image time is added to the image meta-data.  (This is why it is important for the camera time to by synchronized to GPS time.) BaseCamp does a good job of geotagging images, but it does have a limitation for my situation.  I’ve recently started taking all my photos in RAW format, and BaseCamp does not geotag RAW images.  It works fine for JPG and other common formats.  I use PhotoGPSEditor, which has a clunkier UI, but handles RAW image files.  There are a number of software applications available that can geotag images.
  3. Edit the images.  I use iPhoto.  I import the geotagged images into iPhoto, select the keepers, label them as appropriate, crop, and apply some simple enhancements.  Picasa is another app that is good at editing the images.
  4. Select images to be used in the blog post and export from iPhoto.  I construct the narrative of the blog post in my head and choose images that complement the story.  I export the selected images in a reduced resolution: 1100 pixels in the longest dimension.  This looks good on screen and minimizes time to load photos.  (My first blog post used full-size images, and took a long time to load, even on a cable broadband connection.)
  5. Watermark the images with a copyright notice.  I use iWatermark, after researching available software for the Mac.
  6. Write the blog post, inserting images where appropriate.
  7. Create a new trip at EveryTrail.com. This is how I get the Adventure Map.  I upload my GPS track and geotagged images.  I usually upload more than the images selected for the blog post, in order to create a comprehensive slide show.  This involves repeating the export and watermark steps for the larger set of images.  The images will be placed on a map at the location they were taken, along with the GPS track.  [Note: For a simple adventure, EveryTrail can be used can be used as a blog platform.  In addition to a map with track and images located on it, provision is made to label each image, and to provide a narrative of the trip.  EveryTrail will also geotag your images.]
  8. Paste the map link from EveryTrail into your blog.  EveryTrail provides snippets of HTML code that can be copied and pasted into web pages.  This will embed the map with track and images into the blog, and make available a slide show of the images uploaded to EveryTrail.
  9. Copy the elevation profile of the adventure from BaseCamp into your blog.  I take a screenshot of the elevation profile in BaseCamp and upload as an image to the blog.  This may not be interesting in Kansas, but in Albuquerque most adventures involve non-trivial elevation changes.

 

Geotagging iPhone Photos – Metadata Tags

On April 18 I went on a hiking and geocaching day trip.  I used my iPhone to take pictures.  I expected the photos to be tagged with the location they were taken, using the GPS built into the iPhone, and that I would be able to import these geotagged photos into the Garmin BaseCamp application.  Eventually the photos would be linked to maps on this blog, though I haven’t figured out how to do that yet.  This post is about what I discovered about geotagging photos taken by the iPhone; there will be another post about the day trip.

I have a knack for making things much harder than they ought to be.  Uploading pictures to iPhoto was easy, and I spent some time cropping and editing them.  Then I uploaded the day’s tracks from the Garmin GPS 76C receiver to BaseCamp and spent some time joining and splitting tracks into the segments I wanted.  This also was straightforward.  Now it was time to import the pictures.  I exported the photos from iPhoto and imported them into BaseCamp.  BaseCamp did not recognize the photos as being geotagged!

Geotag Detective Story

One reason I write these posts is that I find technical instructions often assume a level of knowledge on the part of the reader that is not there.  Often it is the very most basic information that is missing.  I found that to be the case when researching the relationship between photos geotagged by iPhone and the inability of BaseCamp to recognize those geotags.

The first thing I did was to go back to iPhoto to try to find the location data for the photos.  Of course I was unable to find it.  Turns out I’m using iPhoto ’08 and iPhoto ’09 is the first version to recognize location tags.  iPhoto ’09 is only available as part of iLife ’09 suite.  I don’t use the other parts of iLife enough to warrant purchasing the whole suite just to upgrade iPhoto.  (I understand that Picasa understands photo geotags, but all my pictures are in iPhoto and I’m not ready to change just yet.)

BaseCamp has the ability to geotag digital photos by comparing the time tag of the photo to a track file.  This actually works pretty well.  I used this capability to geotag the iPhone photos by comparing with the tracks from the GPS 76C.  Once BaseCamp had geotagged the picture files, it was able to import them. However, I was not satisfied — the iPhone is supposed to geotag the pictures it takes and I wanted to know why it apparently was not doing so.

A Google search turned up very little about geotagging on the iPhone.  All you have to do is turn on Location Services and all photos will automatically be geotagged.  I had Location Services turned on, but apparently no geotags.

During my hike, I had regularly turned off the iPhone display when not taking pictures.  Maybe the iPhone did not have time to lock onto the GPS satellites before I took a picture, so it did not geotag the photos because it did not know where it was?  (There was no cell service, so GPS was the only way to get a location.)  To test this I brought up the Map app and almost immediately got the little blue pulsing pin showing my location, showing that Location Services knew the location of the iPhone.  (I was actually quite impressed that my actual location showed up.  This was indoors and the GPS signals would have had to come in through the windows.  When Location Services has to use non-GPS data, like cell tower triangulation, it puts my location about 5 miles away.)  I snapped a picture of my desk, uploaded to iPhoto, exported to a file, imported to BaseCamp.  It was not recognized as a geotagged photo.

Some more googling turned up that perhaps exporting the JPG from iPhoto does not include the location data, especially since my version of iPhoto does not know about locations.  Dragging the photo from the library to the hard drive is supposed to solve that.  Nope.  Did not work.

More googling.  People are very sure that the iPhone does indeed geotag photos, but various desktop applications don’t recognize the tags.  Some people email their photos directly from the iPhone to Flickr.  So I emailed my photo to myself, saved it to a file, and imported into BaseCamp, thus skipping iPhoto and any problems it might have altogether.  Still no success; BaseCamp does not recognize that this is a geotagged photo.  The problem could be with BaseCamp (though it imports other geotagged photos properly) or with the iPhone (though no one has reported this problem online).  I don’t have a second application that recognizes geotags with which to do a comparison.  (Actually, Preview displays geotags, but I did not realize it at the time.)

More googling, this time concentrating on BaseCamp rather than iPhone.  Finally I hit pay dirt with this forum post:

The key information that is missing from your photo is the GPSVersionID. BaseCamp looks for the GPSVersionID to see if a geotag is present, and in your photo it doesn’t find it so it doesn’t look any further.

This same forum thread made a passing reference to ExifTool, so I looked it up.  ExifTool is one of those wonderful open source tools authors make available to everyone at no charge.  Here’s the description from the tool’s home page.

ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as the maker notes of many digital cameras by Canon, Casio, FujiFilm, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Nikon, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony.

Downloading and installing ExifTool was a snap.  It has a command-line interface, but I have a passing familiarity with Unix so using Terminal didn’t faze me.  Looking at my test photo that I emailed directly from the iPhone I see that it is indeed geotagged, and that it is missing the GPSVersionID tag.

GPS Latitude Ref                : North
GPS Longitude Ref               : West
GPS Altitude Ref                : Above Sea Level
GPS Time Stamp                  : 20:54:55.64
GPS Dilution Of Precision       : 5
GPS Altitude                    : 1490 m Above Sea Level
GPS Latitude                    : 35 deg 14' 37.20" N
GPS Longitude                   : 106 deg 37' 54.60" W
GPS Position                    : 35 deg 14' 37.20" N, 106 deg 37' 54.60" W

Next step was to see whether BaseCamp would recognize the geotags in the photo if I added the GPSVersionID tag.  The GPSVersionID tag must be in a specific format — I got a hint in this forum post.  I was able to use ExifTool to add the GPSVersionID tag to a geotagged photo.  BaseCamp then recognized the geotags and imported the photo at a specific location.  YAY!!  My inner geek is pleased!

While writing this post, I reviewed the research and found hints that Preview recognizes location data.  Sure enough, you can Show Inspector from the Tools menu to pop up a small More Info window that shows metadata about the photo.  There’s a tab that shows GPS metadata.  When looking at the photo to which I had added the GPSVersionID tag, the GPS Version was shown.  Otherwise GPS Version did not appear.  This is a nicer way of checking the metadata tags than ExifTool, as you can see the photo and metadata at the same time, plus it uses a GUI for navigation.  But you can’t modify the file like you can with ExifTool.

Summary – What I Learned About Geotags

Metadata

  • Metadata refers to information about an object, such as a JPG image, as opposed to the object itself.  The object might be an image of a flower.  Metadata could include the size of the image, the f-stop of the camera taking the picture, and the location where the picture was taken.
  • Embedding metadata in a JPG file is evidently quite complex.  See this post by Phil Harvey to get an appreciation of the complexity.
  • Metadata is identified by tag names.  There are thousands of tag names.
  • Location metadata is identified by tag names that start with GPS.  The GPSVersionID tag is one of these.
  • The GPSVersionID tag has the format n.n.n.n, for example, 2.2.0.0.  However, BaseCamp writes the tag as .. and this seems to work.

iPhone 3G

  • The camera built in to the iPhone 3G with OS 3.0 does geotag photos, but does not include the GPSVersionID tag, which is needed by some applications like Garmin BaseCamp.
  • Geotagging is enabled by turning on Location Services under Settings/General.  That’s it — no dialogs, no warnings, not even a status indicator in the Camera app to tell you that photos are being geotagged.

iPhoto ’08

  • iPhoto ’08 does not know about geotags.  iPhoto ’09 is the first version to recognize location data.
  • iPhoto ’08 exports metadata, including geotags, with photos, even though it does not recognize the geotags.

Preview 5.0

Inspector Window from Preview

Preview showing GPS metadata

  • Preview displays some metadata in the Inspector window.  Bring up the Inspector window from Tools/Show Inspector.
  • Available categories of metadata are
    • General – information about the image, such as size in pixels and color profile.
    • Exif – information about the camera and and settings when taking the photo, such as fNumber and exposure mode.
    • GPS – location data about the image, such as latitude, longitude, altitude.
    • TIFF – information related to TIFF image format, such as orientation and resolution.
  • Preview will show the GPSVersionID tag if it exists.

Garmin BaseCamp 3.0.1.0

  • BaseCamp will import geotagged photos and locate them on its map.
  • BaseCamp looks for the GPSVersionID tag to determine whether the photo is geotagged.  If it does not find the GPSVersionID tag, it stops looking, even if the location tags are embedded.  This means BaseCamp does not recognize photos from the iPhone as being geotagged because of the missing GPSVersionID tag.
  • BaseCamp can geotag photos by comparing the photo timestamp with a GPS track log.  The photo is located at the location in the track log that has a timestamp nearest to the timestamp of the photo.

ExifTool 8.18

  • ExifTool is a free tool that reads and writes metadata in a variety of file formats.  It is available for Mac OS X, Windows, and Unix systems.  ExifTool is written in Perl.
  • On the Mac, ExifTool uses a command-line interface from within Terminal.  There is no GUI.  The tool’s home page states there is a GUI for Windows.
  • I found ExifTool to be easy to install and to use.  ExifTool displayed all the metadata contained within the JPG image files I was working with.
  • It was easy to add the missing GPSVersionID tag.  ExifTool caught my attempts to write the tag in an invalid format.  It automatically creates a backup copy of the file being modified to allow recovery if a mistake is made.
  • ExifTool can do a lot of  stuff with metadata that I haven’t tried.  Not only can it geotag photos from a track log, it can also create a track log from geotagged photos!  How cool is that?