gps坐标系转高德坐标系
详细说明:坐标转换
import requests # 116.497759,39.979316 # 116.497759,39.979331 # 116.497759,39.979346 def gd_map(): para = {'key': '8a2191b448b4de6aefe7fc7f528e2664', # 高德Key 'locations': "116.497759,39.979316|116.497759,39.979331", 'coordsys':'gps'} # 地址参数 url = 'https://restapi.amap.com/v3/assistant/coordinate/convert?' # 高德地图地理编码API服务地址 result = requests.get(url, para) # GET方式请求 result = result.json() print(result) if __name__ == '__main__': gd_map()
执行结果:
python main.py {'status': '1', 'info': 'ok', 'infocode': '10000', 'locations': '116.503782552084,39.980546603733;116.503782552084,39.980561523438'}