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

Undesirable line through Antarctica when using GSHHS #146

Closed
esc24 opened this issue Nov 13, 2012 · 4 comments
Closed

Undesirable line through Antarctica when using GSHHS #146

esc24 opened this issue Nov 13, 2012 · 4 comments

Comments

@esc24
Copy link
Member

esc24 commented Nov 13, 2012

PR #126 provides support for GSHHS coastlines. The source for this feature are shapefiles available from http://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html. When viewed in PlateCarree the combination of two geometries to form Antartica leads to a vertical line at longitude=0 though the continent. Investigate the cause of this artefact and fix it.

@cpelley
Copy link

cpelley commented Jun 18, 2014

Confirmed that this issue is still present:

import cartopy.feature as cfeature
import matplotlib.pyplot as plt
import cartopy.crs as ccrs

ax = plt.axes(projection=ccrs.PlateCarree())
ax.stock_img()
ax.add_feature(cfeature.GSHHSFeature('coarse', edgecolor='red'))
plt.show()

figure_1

I think we should modify the milestone for this issue to 0.12.0, @pelson?

@QuLogic
Copy link
Member

QuLogic commented Oct 19, 2018

The GSHHS shapes are basically like this. The Antarctica polygon is in fact two, one from -180 to 0 and one from 0 to 180. Unless we do some polygon merging, this line is not going away.

In fact, if you use a different central longitude (like say 30), you get two lines:
figure_1-5

@pelson
Copy link
Member

pelson commented Jan 30, 2019

The GSHHS shapes are basically like this.

I agree. Happy enough for this to be addressed in cartopy, but fundamentally, it is an issue with the data itself.

@pelson pelson closed this as completed Jan 30, 2019
@dopplershift dopplershift removed this from the Medium term milestone Sep 17, 2021
@robbiemallett
Copy link

For people viewing this issue, I've just been shown how to draw over the 'undesirable line' with a line of the same color as the land fill like this:

import cartopy.feature as cfea

ax.plot([180, 180], [-90, -85],
                 zorder=3, color=cfea.COLORS['land'],
                 linewidth=2,
                 transform=ccrs.PlateCarree())

A horrible hack, but worked for me so might be useful for some

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

No branches or pull requests

6 participants