matplotlib / matplotlib/basemap
tissot going over the North Pole
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 817
- Forks
- 395
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Sorry if this is a known bug, but I could not find it in this repository, I think I might have seen it in Matplotlib:
When using tissot to plot the theoretical field of view of a satellite looking down to Earth, a ValueError is encountered if the tissot polygon crosses the North Pole. It does not happen on the South Pole.
ValueError: undefined inverse geodesic (may be an antipodal point)
Code snipplet below. I installed Basemap (v1.2.0) through pip.
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import math
earth_radius = 6371000. # m
fig = plt.figure()
m = Basemap(projection='cyl', resolution='l',
llcrnrlat=-90, urcrnrlat=90,
llcrnrlon=-180, urcrnrlon=180)
# define the position of the satellite
position = [300000., 75., 0.] # altitude, latitude, longitude
# radius needed by the tissot method
radius = math.degrees(math.acos(earth_radius / (earth_radius + position[0])))
m.tissot(position[2], position[1], radius, 100, facecolor='tab:blue', alpha=0.3) # longitude, latitude
m.scatter(position[2], position[1], marker='*', c='tab:red')
plt.show()
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das gemeldete Python-Snippet mit Basemap 1.2.0 und dem tissot-Aufruf auszuführen, der den Nordpol überquert. Verfolge den tissot-Pfad und seine geodätische Berechnung, um zu ermitteln, warum der Polfall ValueError auslöst. Erledigt ist die Aufgabe, wenn das Nordpol-Beispiel ohne Fehler ausgeführt wird und das bestehende Verhalten am Südpol intakt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100