Skip to main content

Putting photos on a map using GPS

I was planning to go on vacation to Yosemite, and I got it in my head that I'd like to be able to build a map of where my photos were taken. It turns out to be shockingly easy.

Hardware Required
  • A digital camera. I have a Canon SD400. Almost any digital camera will do.
  • A handheld GPS. I have a Garmin eTrex Vista Cx, but almost any GPS with data export capabilities will suffice.
Figure 1: GPS data plus Digital Photos can produce JPEG photos with location data and KML files for Google Maps or Google Earth.

From the camera's vantage point: Photos with EXIF data

A digital camera often stores the date and time within the photo. The camera also stores tons of other chunks of data within the photo: the camera model, shutter speed, zoom settings, and numerous other parameters. This data is stored inside the JPEG file using a standard called EXIF, and just about every modern digital camera supports this format.

From the GPS angle: Track points

While your GPS is on, it is collecting data about where you are. Every few seconds your GPS notes its latitude, longitude, and altitude, and stores this data within memory along with the current time and perhaps some other data. Each position/time stamp record is called a "track point", and the collection of all track points is called the "track log".

Your GPS's track log can hold a finite number of track points. My Vista Cx can store us to 10,000 track points within its track log. Some GPS units record a point every 1 second, while other GPS units record a point every time you've moved away from your current location. Sometimes the GPS uses a hybrid strategy.

Using a computer, it is possible to pull the track data off of the GPS and store it in a file.

The Merge

The way to building Geolocated photos is to merge GPS track points with a photo's EXIF timestamp. If your photo is dated "January 15th, 2007 at 09:30 AM", all you have to do is look up that time within your track log to find out exactly where the picture was taken.

You can then modify the photo's EXIF data to including latitude/longitude data.

Figure 2: EXIF data, augmented with position data.

Doing this once by hand sounds fun, but it could become tedious if you had dozens (or hundreds) of photos. And so therefore, software has been created that easily does this match/merge process for you. This software will modify the EXIF data for all your photos, given a collection of GPX files.

Using geodata

OK, so now you have a wonderful collection of data: Photos with location data, and tracklogs of where you've been. How can you use it?

Some software
I used GPSBabel to extract the track data from my Garmin Vista Cx GPS into the standards GPX data format.

I used GPSPhotoLinker to merge the track data into my photos. The program loads track logs and photos, and then updates the EXIF data in the photos with the location data plucked out of the track log. It took about 20 minutes to process about 400 photos.

I discovered that JetPhoto Studio can be used to create KML and KMZ files from my collection of photos. JetPhoto Studio also appears to be able to merge GPX files with photos, but I haven't tried that feature yet.

I used Google Earth to view my GPX, KML, and KMZ files.

I also used Google Maps to allow others to easily view my GPX, KML, and KMZ files over the web.

Popular posts from this blog

Fixing a SodaStream Jet, part 1: Disassembly Guide

I've had my SodaStream Jet for years, and once in a while something has gone wrong. Disassembly is the first step to repair.  Start with this article to see how to disassemble the SodaStream, and then once you have that down, scroll through my other articles to see how I repaired specfic SodaStream problems. SodaStream Jet Disassembly Guide Tools Required Flat head screwdriver Phillips head screwdriver 1. Remove the Carbonator.  Duh. 2. Remove the black panel lever The front big black tilt lever needs to be removed first. Removing this panel is tricky, but it isn't impossible. Looking up at the bottom of the black panel, there are two tabs, one on the left and one on the right. These tabs fully secure the panel in place. The trick is to use a flat-head screwdriver under the plastic to gently lever the tabs out of the way.  Note in the pictures how I approach these tabs with my screwdriver.  I usually release the left side first, and then I release ...

Sodastream Carbonator Leakage, Usage, and Weight

SodaStream 60L "Carbonator" CO2 cylinders have a specific weight when empty, plus about 410 or so grams for the CO2 they should have when they're "full".  A little while ago I went to buy a replacement Carbonator from my local hardware store. The dealer pulled a new Carbonator out of the box and sensed it was lighter than usual.  He put the "light" Carbonator in the "empty" pile and sold me a different one.  At that moment I concluded that it would be smart of me to weigh both new and empty SodaStream carbonators.  Here are the results. Weighing a SodaStream Carbonator - for both Science and Consumer Protection.       The dealer told me that sometimes the carbonators leak after they leave the SodaStream filling facility.  That means there could be an opportunity for customers like me to get ripped off! The SodaStream cylinders I buy claim to have a net product weight of 410 grams - and that means that a full Soda Stream Carbonator shou...

Faster Internet during COVID-19

So we're all suffering with slow internet, now that we all have multiple Zoom sessions going and so forth.  Right?  A lot of you keep on asking me what I recommend doing, so here it is: Here's what NOT to do: Do NOT pay your cable TV company for faster Internet. Sorry, but even a "slow" 25 MBit internet connection is going to handle five simulaneous video chats plus streaming video at the same time, with good if not excellent quality.  It is very unlikely that you will overwhelm your ISP Internet connection.  It is very unlikely that paying for higher service will solve any problem. Do NOT get a Mesh router system. Mesh routers are expensive, and their additional radios just add to an already crowded radio spectrum.  Adding several fast cars to a grid-locked highway is not going to solve any problems despite the marketing push. Do NOT add additional network gear. Adding WiFi extenders or additional WiFi access points are only going to result in a...

Fixing my Wahl 9918 Groomsman Beard and Mustache Trimmer

Not everyone would bother repairing a $25 beard trimmer, but why not fix something for under $5 instead of spending another $25? My  Wahl 9918 Groomsman Beard and Mustache Trimmer  has admirably performed its beauty duty for many years, but the time came when the battery just wasn't holding a charge any more.  Most people would just put the trimmer in the trash and buy a new one, but I figured I could repair my otherwise excellent Wahl and save some money. In fact, even high priced trimmer and rotary shaver brands, like Norelco and Remington, can be easily repaired using a process similar to the one I used to fix my Wahl.  Read on to find out how. I opened up the Wahl by popping off the black plastic faceplate with a tiny flathead screwdriver, which revealed two screws.  By removing the two screws I was able to easily open up the unit, revealing the guts of the device. Backplate off, Revealing the screws The internals are rather simple: a motor, a...

Fix a Lightning Cable with Heat Shrink Tubing

We've all seen a Lightning cable that has started to fall apart.  They get used every day, and after enough tugs and yanks on your iPhone, they start to fray. I've seen a lot of these frayed cables, so I've started to fix them before they break with heat shrink tube.  I get my heat shrink on Amazon, like this handy and inexpensive pack.   I prefer the heat shrink tubes without internal glue - it has higher flexibility and a smaller outside diameter once shrunk. Heat Shrink Tubing on an Old, Frayed Lightning Cable In the photo here, you'll see that I slid on a 1.25 inch length of heat shrink over the lighting connector, and then shrunk it into place.  I chose a diameter that just barely fits over the lightning connector.  In all, it took about 60 seconds to perform this repair. Warning: the white plastic of the lightning cable has a pretty low melting point.  It seems to start to melt at about 125°C (or about 250°F), which is the same temperatur...

Bad Drivers

They say that 50% of drivers are better than average, and 50% are worse than average. This is meaningless, as 90% of drivers are lousy, dangerous drivers. There are a lot of cars out there, and therefore you see a lot of driving nonsense.  Drivers are texting, reading, and eating cereal from a bowl.  Drivers speed into intersections and crosswalks.  They crawl at traffic lights, they quickly accelerate and decelerate due to a lack of attention.  They ignore signs and roadway markings.  They ignorant that the pavement is wet and it's 32° F outside. In the mean time, the police really can't keep up with it.  Pulling people over for minor infractions is a pointless game, particularly because cars pulled over increase traffic and therefore increases the potential for accidents.  Furthermore, it isn't right to give someone a $100 ticket for a stupid and meaningless infraction.  Cops generally have better things to do. But when you add it all up...

Other Posts

Show more