matplotlib / matplotlib/basemap
Great Circles break in some cases
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 817
- Forks
- 395
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the drawgreatcircle function and reproduce the issue using the Robin projection and coordinates from the example. Inspect how max_dist is calculated and how route jumps are detected; done means the middle of the great-circle route is rendered without truncation or incorrect jumps for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100