【发布时间】:2014-11-12 21:44:34
【问题描述】:
我以前没有使用过 Python,但有人告诉我这将是一种用于此过程的好语言。我有一个纬度/经度坐标列表,我需要将其转换为公司名称。我可以在哪里找到有关如何完成此过程的文档的任何想法?
例子:
Doc: LatLong.txt(有一个由列分隔的纬度/经度列表) 我需要针对最大半径为 30 的 Places API 运行该列表,并返回该半径内的所有企业(BusinessName、Addy、Phone 等)。
from googleplaces import googleplaces
YOUR_API_KEY = 'aa262fad30e663fca7c7a2be9354fe9984f0b5f2'
google_places = googleplaces(YOUR_API_KEY)
query_result = google_places.nearby_search(lat_lng=41.802893, -89.649930,radius=20000)
for place in query_result.places:
print (place.name)
print (place.geo_location)
print (place.reference)
place.get_details()
print (place.local_phone_number)
print (place.international_phone_number)
print (place.webite)
print (place.url)
是我在玩的东西..
【问题讨论】:
-
你能分享样本数据吗?或到目前为止您尝试过的代码