Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Magnetic coordinates and lines drawing across the world map

Open
#222 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start by reproducing the magnetic-coordinate map shown in figure_1 and trace how Basemap.call() transforms coordinates before _readboundarydata() creates coastlines and polygons. Read the existing east/west dateline-crossing logic to determine how it relates to projection boundaries. Done means coastlines and polygons are correctly broken at the left and right plot edges for magnetic coordinates.

Written by the indexing model from the issue text.

Description

I'm extending basemap to work with magnetic coordinates. Basically, latitude longitude are converted to/from magnetic coordinates during calls to Basemap.__call__(). However, I get results like this:

figure_1

It seems that coastlines/polygons are not properly "broken" on the left/right plot edges. I suspect I have to change something in _readboundarydata() to fix this (since that's where the coastlines and polygons are initiated), and I have had a look at it, but I do not really see what I would need to change. I don't even see how this is handled in the normal (geographic coordinates) case. There are some references to the crossing of east/west datelines, are these "datelines" the left/right map boundaries in projections like the above? I don't really understand what this part of the code accomplishes.

Any tips?

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from matplotlib/basemap

All issues in matplotlib/basemap

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.