0

Is there a specific Python package that allows me to assign coordinate location to a string?

For instance, say I have location data in the form of names, such as Burbank, CA.

Is there a module that allows me to assign coordinates to that string?

I'm new to programming so I'm not aware of all its functionality.

  • What GIS software are you already using? Reviewing the documentation from its Python library would be the place to start. – PolyGeo Apr 14 '17 at 19:43
4

One way would be to ask google maps api

import requests

city = 'burbank'
r = requests.get("https://maps.googleapis.com/maps/api/geocode/json?address={}".format(city))
lonlat = r.json()['results'][0]['geometry']['location']

Not the answer you're looking for? Browse other questions tagged or ask your own question.