According to the article by "Hitoburogu", "The appeal of the revolutionary manufacturing environment" Pythonista 3 "that runs on iOS" (http://hitoriblog.com/?p=42145), Pythonista3 is an iPhone. It seemed easy to take out the geotag from the photos taken in.
The other day, I was taking a picture with GPS on to casually record the place I was guided by an acquaintance. If you import it to a Mac, you can display the geotag of the photo, but it's even more convenient if it's completed on the iPhone alone. Since iPhone and iPad can also provide route guidance, I made an app that can even guide the route to the shooting location by referring to the geotag from the photo.
When launched, the app you create prompts you to select a photo from your iPhone's library. When you select a photo, it launches the Google Maps app and displays the route you drive from your current location to the location where the photo was taken. See https://developers.google.com/maps/documentation/ios-sdk/urlscheme?hl=ja for the Google Maps URL scheme.
goForPhotoLocation.py
#!python3
# _*_ coding: utf-8 _*_
import photos
import webbrowser
gm = 'comgooglemaps://?center='
p = photos.pick_asset()
pl = p.location
loc = str(pl['latitude']) + ',' + str(pl['longitude'])
url = gm + loc + '&daddr=' + loc + '&directionsmode=driving'
webbrowser.open(url)
Recommended Posts