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.

closed as too broad by PolyGeo Apr 14 '17 at 21:03

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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.