Route guidance to iPhone photography location with Pythonista

Pythonista can also play with photos

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.

Take a photo to record the location

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.

Up to route display in Pythonista3

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.

Source program

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

Route guidance to iPhone photography location with Pythonista
Add images to iOS photos with Pythonista
Crop the image to rounded corners with pythonista
Try to make client FTP fastest with Pythonista
I tried to draw a route map with Python
[Python] How to specify the download location with youtube-dl
termux × AWS Send smartphone location information to AWS with IoT
Try to tamper with requests from iphone with Burp Suite