You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oceans from Natural Earth do not display correctly with TransverseMercator setting cenral_longitude to other than 0.
The whole Earth appears covered in water, several times judging for the opacity.
Other projections seem to work fine, and other elements of PhysicalEarth work as well.
Code to reproduce
This code includes working and non working pieces. Select the first PROJECTION to see the bug.
import cartopy.feature as cfeature
from cartopy import crs as ccrs
import pylab as plt
PLATE_CARREE = ccrs.PlateCarree()
# This projection doesn't work:
PROJECTION = ccrs.TransverseMercator(central_longitude=15, scale_factor=0.9996, approx=False)
# These do
PROJECTION = PLATE_CARREE
PROJECTION = ccrs.AlbersEqualArea()
PROJECTION = ccrs.TransverseMercator(central_longitude=0, scale_factor=0.9996, approx=False)
PROJECTION = ccrs.Mercator(central_longitude=15)
lat = [59.234952, 59.561187, 60.0401]
lon = [17.851566000000002, 17.552861, 18.680685999999998]
fig, ax = plt.subplots(1, 1, subplot_kw={'projection': PROJECTION})
ax.scatter(lon, lat, transform=PLATE_CARREE)
lakes_10m = cfeature.NaturalEarthFeature('physical', 'lakes', '10m',
edgecolor='b', facecolor='b', alpha=0.1)
ocean_10m = cfeature.NaturalEarthFeature('physical', 'ocean', '10m',
edgecolor='b', facecolor='b', alpha=0.1)
ax.add_feature(lakes_10m) # This one works
ax.add_feature(ocean_10m) # This doesn't
plt.show()
Description
Oceans from Natural Earth do not display correctly with TransverseMercator setting cenral_longitude to other than 0.
The whole Earth appears covered in water, several times judging for the opacity.
Other projections seem to work fine, and other elements of PhysicalEarth work as well.
Code to reproduce
This code includes working and non working pieces. Select the first PROJECTION to see the bug.
Full environment definition
Operating system
Fedora 32
Cartopy version
0.18.1.dev125+gd12c86c
pip list
The text was updated successfully, but these errors were encountered: