当我尝试运行以下代码时:
#!/usr/bin/env python3
import matplotlib.path as mpath
import matplotlib.pyplot as plt
import numpy as np
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import shapely
ax=plt.axes(projection=ccrs.NorthPolarStereo())
ax.add_feature(cfeature.LAND,facecolor='green')
plt.show()
我得到以下错误:python3: LineString.cpp:125: const geos::geom::CoordinateSequence* geos::geom::LineString::getCoordinatesRO() const: Assertion `nullptr != points.get()' failed. Aborted
我不确定问题是不是来自cartopy本身。我在Linux (Debian 10)上运行代码,python版本是3.7.3,shapely版本是1.7.1,cartopy版本是0.18.0,libgeos版本是3.7.1
谢谢你的帮助。
发布于 2020-09-18 18:27:17
问题解决了,我通过pip安装了cartopy,我从git库的最新版本编译它来重新安装它。
https://stackoverflow.com/questions/63935818
复制相似问题