Open JosephBARBIERDARNAL opened 3 weeks ago
Yes, I think it is expected (see note in geopandas docs about objects crossing the dateline: https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.to_crs.html)
Here is a different version that should be working:
proj = ccrs.Mercator(central_longitude=10)
url = "https://raw.githubusercontent.com/holtzy/The-Python-Graph-Gallery/master/static/data/all_world.geojson"
world = gpd.read_file(url)
world = world[~world['name'].isin(["Antarctica", "Greenland"])]
fig, ax = plt.subplots(figsize=(12, 8), dpi=300, subplot_kw={'projection':proj})
ax.add_geometries(world["geometry"], crs=ccrs.PlateCarree(), facecolor='none')
plt.show()
Description
When using
central_longitude=10
, the output chart becomes unvalid with some horizontal lines (seems to be Canada being deformed in the case below).centra_longitude
different of 0.Since the error is a bit too obvious, I doubt I'm first one having the issue, but I haven't found something similar on the internet/issues. Is it an expected behavior?
Code to reproduce
This is a copy-pastable example:
Traceback
None
Operating system
MacOS Sonoma
Cartopy version
0.23.0