Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug on #300 #123

Closed
holtzy opened this issue Feb 8, 2022 · 0 comments
Closed

bug on #300 #123

holtzy opened this issue Feb 8, 2022 · 0 comments
Labels

Comments

@holtzy
Copy link
Owner

holtzy commented Feb 8, 2022

Reference: https://github.com/holtzy/The-Python-Graph-Gallery/blob/master/src/notebooks/300-draw-a-connection-line.ipynb

ERROR: GeodError: inv_intermediate: npts and del_s are mutually exclusive, only one of them must be != 0.

This is happening, because when compiling, there are equal points being compiled, and therefore there is no possibility of plotting the line that interconnects the points. As the image below:
image.png

Solution suggestion.

Loop on every pair of cities to add the connection

for startIndex, startRow in df.iterrows():
for endIndex in range(startIndex, len(df.index)):
endRow = df.iloc[endIndex]
if startRow.city == endRow.city:
pass
else:
m.drawgreatcircle(startRow.lon, startRow.lat, endRow.lon, endRow.lat, linewidth=1, color='#69b3a2');

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant