GPS

About obssesions

February 8, 2016

Gps and EXIF data

To start and put yourself into the action we need to talk about some basic thing in life, like… your smartphones and all those lovely pictures that you take to your face (selfies) and to your food (foodies?). Everytime that you take a picture your dear phone attach some data to that picture, that data it’s called EXIF DATA , besides the date, hour, and that kind of logical data that it’s very useful and important, you also have a lot of technical data of your camera, like exposure, focal length and another funny things about pictures that probably if you take a lot of selfies this is the first and last time you heard about it.

To the POINT

Ok I will try to be nice, well the thing it’s with my friend Marceliwi we were talking about life, and website and a idea come to our minds (that sound like some kind of zerg-hive mind thinking) and in this idea at some point I endend trying to do something that before leaving Chile I have in mind, get some Gps data from my pictures and try to display it in a nice lovely designed way (some shit narrow ultra unlegible thin font with drop shadow).

Getting Data from the picture

CodeFail
Me, trying to do some code, ALWAYS.

Lately I’m really into Jekyll and, well not pay for having a blog, frontmatter, limitations of github pages, so my first and only option was JAVASCRIPT, JS to friends.

A little google search and Badaboom!!, some good guy made a library to get the EXIF data from pictures and it’s coming with a PDF that explains a lot of things about EXIF, that’s what I call a well documented plugin.

Welcome to trouble-town sucker

So, plugin found, time get those hands dirty, Hi my name it’s NULL and this is my friend UNDEFINED, I grab one of the pictures from past week, and try to get the location, surprise, no location… and guess who get obssesed with understand what was wrong, moi (that’s french).

how it’s this possible!?!?

I said to myself in my funny voice.

Photos app, search for the info, and there was, the bloody map with the location of the picture, but seconds before, there was nothing in my little Js experiment, well maybe was the picture, so try again, and again, and again, and again, and FUCK THIS SHIT what’s wrong with this universe?!?!?!.

Back again to google to search for some answers and well, it’s kind of hard find the answers with the words “gps location picture photos”.

I want to take this paragraph to say thanks to Apple again for having such a creative name for the photos app, photos.

After a while and a lot of tries, in one random blog one comment brings light to my dark life…

“The moment it is emailed or uploaded, all of that information is stripped.”

Sharri

This random guy gives me the solution to my problem, the thing it’s that actually for security reasons appears that when you upload a picture to flickr or even when you copy a picture from Photos to another place, the Exif GPS Data gets stripped from the picture, I say appears cuz I only experimented finding the original pictures inside the Photos package library.

But you’re not explaining anything you moron

That’s right my knowledge-starving friend, I’m just telling the not-code part of the problem, If you want to understand more about EXIF and how Flickr does to get all that data click this incredible long link so you can learn an understand how to translate the first 128k of information in the EXIF and read it from bytes to human.

Oscardicaprio
Pls give him an Oscar.

And voila (that’s french) problem solved, now I have pictures with a lot of EXIF DATA for this little weird idea, actually I always had those pictures, but thanks for protect my life from the evil location searchers in the universe, and again thanks to apple for REMOVE the “Show file in finder” from Photos.

Where are my “originals”?

The easy way, look at the gif:

tutorial
Yes, my computer it's like my mind, mitad Spanish half Inglés.

Even that the folders doesn’t make so much sense, if you look at the numbers, you will realize that are created by month, then by day, and then some strange numbers with your pictures inside, so for your EXIF DATA EXTRACTION try to use this files, probably if you are on Windows, you won’t have this kind of problems, and if you are in Linux, well probably you will be writing a better plugin rather than reading this post.

Forget about the hard way, why should you want to do things in the hard way if you can do it in the easy way, and that my friends, it’s a life lesson, about doing things easy, not about the EXIF GPS DATA extraction.