>>> import geopandas /lib/python3.8/site-packages/geopandas/_compat.py:84: UserWarning: The Shapely GEOS version (3.9.1-CAPI-1.14.2) is incompatible with the GEOS version PyGEOS was compiled with (3.10.0-CAPI-1.16.0). Conversions between both will be slow. warnings.warn(解决办法:
1、卸载pygeo
pip uninstall pygeo
>>> import geopandas Traceback (most recent call last): File "tif2geojson_isoband_v5_dissolve_clip_0_last.py", line 258, inprocess(tif_file, result_path, sigma, each, levels) File "tif2geojson_isoband_v5_dissolve_clip_0_last.py", line 187, in process gpd_diff = gp.overlay(gpd_current, File "/home/geovis/.local/lib/python3.8/site-packages/geopandas/tools/overlay.py", line 315, in overlay result = _overlay_difference(df1, df2) File "/home/geovis/.local/lib/python3.8/site-packages/geopandas/tools/overlay.py", line 80, in _overlay_difference idx1, idx2 = df2.sindex.query_bulk(df1.geometry, predicate="intersects", sort=True) File "/home/geovis/.local/lib/python3.8/site-packages/geopandas/base.py", line 2637, in sindex return self.geometry.values.sindex File "/home/geovis/.local/lib/python3.8/site-packages/geopandas/array.py", line 292, in sindex self._sindex = _get_sindex_class()(self.data) File "/home/geovis/.local/lib/python3.8/site-packages/geopandas/sindex.py", line 21, in _get_sindex_class raise importError( importError: Spatial indexes require either `rtree` or `pygeos`. See installation instructions at https://geopandas.org/install.html
2、安装rtree
pip install rtree
>>> import geopandas >>>参考:
https://github.com/geopandas/geopandas/pull/1794
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)