basemap icon indicating copy to clipboard operation
basemap copied to clipboard

Great Circles break in some cases

Open davidmanheim opened this issue 10 years ago • 1 comments

Due to the fix implemented for great circles getting cut off when intersecting map edges, (commit # 35b9207b5ac167f89378a74fc3bd7e8a70e83ae0) in certain cases, for some projections, the middle of the routes are truncated.

Example:

    map_projection = bmp.Basemap(projection='robin', lat_0=0, lon_0=0, resolution='c')
    lat1, lon1 = (51, 5)
    lat2, lon2 = (61, -150)
    map_projection.drawgreatcircle(lon1, lat1, lon2, lat2)

The obvious fix is to increase the multiplier for max_dist when it is calculated in the function, (max_dist = 1000 * del_s * 2) from 2 to, in this case, 5. Without increasing it greatly, the problem will appear for routes near enough the poles in this projection, or could cause actual jumps not to be found.

Alternatively, the decision could be based on whether the difference is much larger than the previous difference; I will try to implement this and submit the fix.

davidmanheim avatar Dec 23 '14 21:12 davidmanheim

yes!

AaronFeng29 avatar Oct 13 '23 06:10 AaronFeng29