egu22pygmt
egu22pygmt copied to clipboard
Countries not showing up in world map example
User reported at https://forum.generic-mapping-tools.org/t/not-able-to-draw-closed-polygons-using-pygmt/3663 that the geopandas.GeoDataFrame plot example in https://www.generic-mapping-tools.org/egu22pygmt/ecosystem.html isn't working.
fig.plot(data=world, pen="1p,black", close=True, color="+z", cmap=True, aspatial="Z=pop_est")
produces this error
plot [ERROR]: OGR parsing incomplete (is file missing OGR statements?) - abort
and a blank map

The change happened after #23 on Nov 2022 (see diff on gh-pages branch at https://github.com/GenericMappingTools/egu22pygmt/commit/6b599217fd8fa40eca1346442ddf424fa1e27561), and my guess is that this is related to the naturalearth_lowres update in https://github.com/geopandas/geopandas/pull/2418 in Jun 2022 which updated the GeoDataFrame to have a mix of Polygon/MultiPolygon types, which isn't supported yet in PyGMT/GMT (see https://github.com/GenericMappingTools/pygmt/issues/2405).
TODO: Update the notebook with some workaround so that the map is showing in the JupyterBook. E.g. following https://forum.generic-mapping-tools.org/t/not-able-to-draw-closed-polygons-using-pygmt/3663/3, or some other non-explode way.