2

I have a polygon that consists of a few (lon, lat) points, each pair of consequent points is considered to be connected by orthodromes. I want to interpolate the polygon with some extra points between each source point pair (add some more waypoints lying on the orthodrome).

I know, that geopy, for example, has the possibility to calculate the distance on great circle, but I need some more: to find the waypoints on great circle.

I need something like that:

src_lon = 10
src_lat = 40

dst_lon = 20
dst_lat = 60

n_points = 100

lons, lats = interpolate_orthodrome(src_lon, src_lat, dst_lon, dst_lat, n_points)
0

1 Answer 1

4

I have found a good solution:

pyproj.Geod.npts:

from pyproj import Geod


lon0, lat0 = 10, 10
lon1, lat1 = 20, 20
n_extra_points = 100    

geoid = Geod(ellps="WGS84")
extra_points = geoid.npts(lon0, lat0, lon1, lat1, n_extra_points)
  • List item

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.