生成坐标点的具体方法
import geopy.distance
def get_distance_point(lat, lon, distance, direction):
"""
根据经纬度,距离,方向获得一个地点
:param lat: 纬度
:param lon: 经度
:param distance: 距离(千米)
:param direction: 方向(北:0,东:90,南:180,西:360)
:return:
"""
start = geopy.Point(lat, lon)
d = geopy.distance.VincentyDistance(kilometers=distance)
return d.destination(point=start, bearing=direction)
调用示例
>>> import geopy
>>> import geopy.distance
>>> p = get_distance_point(39.90733345, 116.391244079988, 8.5, 90)
>>> print (p.latitude, p.longitude)
(39.90729084605293, 116.49064857447016)