Getting Google Maps from Photographs (AKA Yes, you CAN build iOS apps with Python!)

in #python6 years ago (edited)

Screenshot from 2018-06-19 09-45-42.png

In my previous post I mentioned Pythonista and I don't think I have really done enough to tell people about this amazing app.

  • You can get Pythonista from their website or the app store
  • It's both an IDE and a 2.7/3.5 interpreter
  • If you have xcode you can even package as native apps

App to load Google Maps with coordinates from a photograph

output.gif

It's not just a cool toy, it actually comes in valuable.

For example, a lot of the time I find interesting places, and when I want to return I can't quite figure out where I was. Now with this custom app, I can extract the location and get directions from my photographs!

Pythonista makes it easy because they have a photo picker built right in, and from the selected asset you can get the location, then launch a browser with the Google Maps URL scheme.

Cool, eh? :)

import photos
import webbrowser

picked = photos.pick_asset()
print(dir(picked))
geo_loc = picked.location
lat = geo_loc['latitude']
long = geo_loc['longitude']
map_url = "comgooglemaps://www.google.com/maps/?q={},{}".format(lat,long)
print(map_url)
webbrowser.open(map_url, new=1, autoraise=True)
Sort:  

Hi. It is beautiful! but I have one question about that. I think this alogorithm is just extracting GPS value from image file format. not searching or using AI. Right?

hello very useful information in these days I have put learn a bit of pyton and is a super versatile tool greetings from venezuela

Hi, another big Pythonista fan here. Just wanted to come by and say hello. A very helpful script, which I am sure, I will add to my collection too.

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.032
BTC 63572.52
ETH 3097.69
USDT 1.00
SBD 3.88