小编Hea*_*ker的帖子

在 GeoDataFrame 中查找不重叠的多边形

我有一个包含一列 shapely.polygons 的 GeoDataFrame。其中一些是不同的,一些则不是:

In [1]: gdf
Out[2]:
    geometry
1   POLYGON ((1 1, 1 2, 2 2, 2 1, 1 1))
2   POLYGON ((1 3, 1 4, 2 4, 2 3, 1 3))
3   POLYGON ((1 1, 1 2, 2 2, 2 1, 1 1))
4   POLYGON ((3 1, 3 2, 4 2, 4 1, 3 1))
5   POLYGON ((1 3, 1 4, 2 4, 2 3, 1 3))
Run Code Online (Sandbox Code Playgroud)

我只需要找到不同的(不重叠的)多边形:

In [1]: gdf_distinct
Out[2]:
    geometry
1   POLYGON ((1 1, 1 …
Run Code Online (Sandbox Code Playgroud)

python shapely geopandas

5
推荐指数
1
解决办法
2612
查看次数

标签 统计

geopandas ×1

python ×1

shapely ×1