在 Python 中使用 Google Maps API 对中国地址进行地理编码?
我研究了 Geopy 和 googlemaps (http://py-googlemaps.sourceforge.net/)而且它们都不适用于中文地址。我的应用程序存储在 Google App Engine 上。我想要做的是解析包含香港餐馆地址的文件,然后对地址进行地理编码并将纬度和经度存储在数据存储中。我该怎么做?
I have looked into Geopy and googlemaps (http://py-googlemaps.sourceforge.net/) and they both do not work for Chinese addresses. My app is stored on the Google App Engine. What I want to do is to parse a file containing addresses of restaurants in Hong Kong, and then Geocode the addresses and store the Lat and Lng in the datastore. How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试中文版 GoogleMaps ditu.google.cn。它比英文谷歌地图中对中国的覆盖范围要好(至少是几年前我上次查看它时的情况)。
请注意,中国政府限制国外使用 GIS 数据,因此如果您位于中国境外,可能没有良好的地理编码解决方案可用。
Try the Chinese language version of GoogleMaps ditu.google.cn. It is better than the China coverage in the English Google Maps (at least it was a couple of years ago when I last looked into it).
Be aware that the Chinese government restricts foreign use of GIS data, so there may not be a good geocoding solution available if you are based outside China.
我不确定 API 在中国是否提供地理编码。您是否还说,即使使用谷歌地图界面,您也无法使地理编码工作。如果是这种情况,那么您最好尝试转向其他服务,因为 gmap 网站中有很多功能不在 API 中。因此,如果网站无法工作,那么 API 很可能无法工作。
I am not sure the API provides geocoding in China. Are you also saying that even with the google maps interface you can not get the geocoding to work. If that is the case then you better try to move on to a different service since there is quite a bit of functionality in the gmap website that is not in the API. So if the website doesn't work it is probably a darn good bet the API won't work.