⏰Subscribe to our channel!
/ @practicalpythonsolutions-b4478
---
Python can help in so many ways! In this 3rd video on Image Management, we will discover where old photos were taken by using Python and Google.
We will work to extract Exif data from digital images and convert to location data with google APIs.
This video is Part III of my series of photo image processing. In this series, we are writing python code to find and extract key metadata from photo image files
In the first two videos we learned how to extract the device make, model and timestamp from various photo images, including from heic and raw images. [Video] we ended up with a list similar to this one, which was very helpful.
In this video, we are going to take it a step further, and get the location data from our photos as well.
Getting the location data is a little trickier than what we’ve done before as we not only need to pull values from the image metadata but we also need to convert these values to latitude and longitude coordinates.
Once we have the coordinates, we’ll go to our friends over at google maps to get the location the photo was taken via their geocoding API.
Some of these APIs are pay-for services but I’ll show you how to get a one-year free trial on the Google Cloud Platform, so we can use the API for free. Hopefully, by the time the free trial expires, we’ll have a real developer account or some other way to do this.
So, similar to last time, we’ll start off with a new python file to process the geoInfo and then, once it’s working we’ll incorporate it into our current program as additional detail.
I jused the APIs from the Google Cloud Platform but another option for these apis is to use the Here Developer Network. I will leave the code and url in the comments of the code (GitHub) to access the here apis. And search for the returned Json file for the address. The Here developer network requires an account but they have “Freeium” version that will allow you to use their APIs. There is a restrictino on the amount of requests but it’s like 250k a month, more than sufficient for our purposes. They also give you an account without requiring a credit card so this may be a better option for you if you’re worried about that?
I did not include HEIC or Raw images in the geo information section. I’m happy to revisit …so if you leave comments below or on my Github repository, I can revist
Watch video How to get location data from photo images (Part 3) online without registration, duration hours minute second in high quality. This video was added by user Practical Python Solutions 19 May 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,325 once and liked it 32 people.