Shelter-in-Place Journal, Day 170

My goal today was to finish editing the photos from our New York trip in 2008, but I got distracted.

As I’ve said before, I am geotagging and titling every photo I keep. I try to use Lightroom’s built-in map search to do the work, but sometimes it doesn’t find an address or building name, so I turn to Google Maps, which is much better at figuring things out.

But it’s not easy to get a latitude and longitude out of Google Maps; it gives you something called a Plus Code (for example, the Plus Code for Grand Central Terminal is “87G8Q23F+34”). And there’s code on GitHub to turn a Plus Code into a latitude and longitude.

Except that Google actually gives a “shortened” code – one which is relative to a city nearby (in this case, “Q23F+34 New York”), and the sample code I found couldn’t handle a shortened code very easily.

The Google Maps API can handle the shortened code just fine, though, so I wrote a very small and simple-minded program to convert a Plus Code to a latitude and longitude that I can paste into Lightroom. And a TextExpander snippet to make it easy to do so.

While I was at it, I let the program pass basically any string to Google Maps in the hope that it’ll recognize it:

> ./pluscode.py Grand Central Terminal
40.7527262,-73.9772294

And I added a special case for coordinates that I cut-and-paste from geocaches to convert “N 40° 41.117 W 073° 58.509” to “40° 41.117 N 073° 58.509 W” because Lightroom wants the hemisphere label after the coordinate value.

Oh, yeah, I had to create an API Key to use the geocoding service and tie it to my Google Account.

But with all that done, I can copy a plus code or an address or coordinates from a geocache into the “GPS” field in Lightroom, type ”˜;pc’ and voilà, my photo is geotagged!

Of course, as I was writing this post, I discovered that Lightroom’s Map Module search will use a shortened Plus Code just as well as it uses an address. But I’m still glad I wrote this code, because it saves me a trip to the Map Module.

That’s my story and I’m sticking to it.

Shelter-in-Place Journal, Day 169

I’ve been editing at least one days’ worth of photos every day for the last two weeks, and I’ve made a lot of progress – I’m nearly finished with 2008 (I have to backtrack and deal with our first National Trust tour, five days in New York City).

I have titled and geotagged every photo I kept – but I was afraid that this one would stump me. I remember the victory party on November 4, 2008, but neither Diane nor I could remember where it was held. Neither of us had any email about the party, nor was it on our calendars. And I hadn’t blogged about the party (though I did blog a bit about the election).

In desperation, I turned to Facebook. Diane’s timeline had a posting on November 10: “changed her photo to one taken at the Silicon Valley Obama Election Night celebration!” Searching the web for “Silicon Valley Obama Election Night” brought me to this YouTube video, which opens with a title card showing the location: the Computer History Museum. Problem solved!