使用python实现地理位置查询经纬度 | 您所在的位置:网站首页 › 用经纬度查询地理位置怎么查 › 使用python实现地理位置查询经纬度 |
地理编码工具geocoder
地理编码工具geocoder,不同厂商的服务整合统一起来 地理编码 import geocoder g = geocoder.google("1403 Washington Ave, New Orleans, LA 70130") g = geocoder.arcgis(u"北京市海淀区上地十街10号") g.latlng输出为 [29.9287839, -90.08421849999999]也可以查看完整的geojson g.geojson逆地理编码 #可以换成arcgis的服务试试 g = geocoder.google([29.9287839, -90.08421849999999], method='reverse') print g print g.address print g.city print g.state print g.countrygeocoder 的功能不止于此,它还可以查IP(包括自己的) g = geocoder.ip('199.7.157.0') print g.latlng print g.city g = geocoder.ip('me') print g.latlng print g.city |
CopyRight 2018-2019 实验室设备网 版权所有 |