Question

I have the following situation: The pictures that my app stores on Google Drive have GPS position written in the EXIF data. See here. I'd like to use the position later for additional indexing. Maybe even to get a street address from one of the friendly Google APIs. But it looks to me that there is no obvious integration of the GPS data with Google indexing. If I leave them in the EXIF header, I can't even get to them using Drive API. So, my only option seems to be to pull the JPEG file, parse EXIF myself, call Google Maps API to get the street address (didn't try this one yet, just assuming there is such a method), and push the address data back to my 'meta', 'description' or 'IndexableText'. Or I can push the GPS coordinates directly to my meta data when storing the JPEG (2 signed floats only, afterall). This effectively duplicates the EXIF info (and I love duplicate data). So my question is: Am I missing something obvious? Are there any plans to do this "EXIF GPS data" -> "street address" on Google Drive level? Is it already there? Should I do it myself or wait? Thanks, sean

Was it helpful?

Solution

Google Drive SDK returns an imageMediaMetadata field for image files that contains basic properties of the image and EXIF information. At the moment, Drive doesn't reverse geocode the geo-coordinates on the EXIF metadata to provide street addresses.

Depending on your scale and performance requirements, you either can extract them by yourself or use image metadata returned by the API and then reverse geocode with Google Maps APIs. You can use custom file properties to append an address. Properties are query-able, you can build a search feature on top of them. A sample property entity looks like what's below. Read documentation for more details.

{
  "key": "address",
  "value": "City of Westminster, WC2N 5DN, United Kingdom",
  "visibility": "PRIVATE"
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top