Basemap creation fails for map covering pole
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-visualization
Research direction
Reproduce the exact Basemap call with projection='stere', lat_0=-88, and lon_0=-3, then compare it with the working lon_0=-2 case. Start in mpl_toolkits/basemap/init.py at _readboundarydata and follow the failure into _geoslib.pyx at BaseGeometry.fix. Done means the pole-covering map no longer raises the IndexError.
Written by the indexing model from the issue text.
Description
>>> Basemap(width=1000000, height=1000000, projection='stere', lat_0=-88, lon_0=-3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "..\site-packages\mpl_toolkits\basemap\__init__.py", line 1085, in __init__
self._readboundarydata('gshhs',as_polygons=True)
File "..\site-packages\mpl_toolkits\basemap\__init__.py", line 1428, in _readboundarydata
if not poly.is_valid(): poly=poly.fix()
File "_geoslib.pyx", line 234, in _geoslib.BaseGeometry.fix (src/_geoslib.c:2233)
File "_geoslib.pyx", line 334, in _geoslib.Polygon.__init__ (src/_geoslib.c:3479)
IndexError: index -1 is out of bounds for axis 0 with size 0
Strange thing is that e.g. using lon_0=-2 works.
I'm using basemap 1.0.8.
- Dominant language
- Python
- Stars
- 817
- Forks
- 395
- PR merge metrics
- No merged PRs in 30d
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.
More from matplotlib/basemap
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
matplotlib/basemap#368 ·
-
Python 3.14 wheels Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
matplotlib/basemap#652 · 2 comments · 5 reactions ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
matplotlib/basemap#649 · 2 reactions ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
matplotlib/basemap#646 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
matplotlib/basemap#645 · 2 comments ·
All issues in matplotlib/basemap
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·