calculating a gps coordinate given a point, bearing and distance

前端 未结 4 380
粉色の甜心
粉色の甜心 2021-02-04 21:30

I have a problem which draws my back in some project for some time now.

I\'m basically looking to trap a polygon using x,y points drawn by some script I\'ve written. lat1

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-04 22:12

    Why don't you use nice libraries?

    from geopy import Point
    from geopy.distance import distance, VincentyDistance
    
    # given: lat1, lon1, bearing, distMiles
    lat2, lon2 = VincentyDistance(miles=distMiles).destination(Point(lat1, lon1), bearing)
    

    For lat1, lon1, distMiles, bearing = 42.189275,-76.85823, 0.5, 30 it returns 42.1955489, -76.853359.

提交回复
热议问题