几何必须是使用Cartopy的Point或LineString错误

问题描述 投票:0回答:1

我正在尝试运行一个简单的Cartopy示例:

   import cartopy.crs as ccrs
   import matplotlib.pyplot as plt
   ax = plt.axes(projection=ccrs.PlateCarree())
   ax.coastlines()
   plt.show()

但是我收到此错误:

几何必须是Point或LineStringpython: geos_ts_c.cpp:4179: int GEOSCoordSeq_getSize_r(GEOSContextHandle_t, const geos::geom::CoordinateSequence*, unsigned int*): Assertion0!= cs失败。]

我使用miniconda3安装了Cartopy:conda install -c conda-forge cartopy我还尝试通过pip(在虚拟环境中)安装Cartopy,但出现相同的错误。我的操作系统是Debian Buster。

任何想法?

python cartopy
1个回答
0
投票

问题是shape的错误版本,不应使用Cartopy使用二进制程序包,而应从源代码构建它。这将在herehere中进行说明。

所以我做到了:

pip uninstall shapely
pip install shapely --no-binary shapely
© www.soinside.com 2019 - 2024. All rights reserved.