In default settings, overlay()
returns only geometries of the same geometry type as GeoDataFrame (left one) has, where Polygon and MultiPolygon is considered as a same type (other types likewise). You can control this behavior using keep_geom_type
option, which is set to True by default. Once set to False, overlay
will return all geometry types resulting from selected set-operation. Different types can result for example from intersection of touching geometries, where two polygons intersects in a line or a point.
在默认设置中,overlay() 仅返回与 GeoDataFrame(左侧)具有相同几何类型的几何图形,其中 Polygon 和 MultiPolygon 被视为相同类型(其他类型同样)。你可以使用 keep_geom_type 选项控制此行为,该选项默认设置为 True。一旦设置为 False,overlay 将返回由选定的设置操作产生的所有几何类型。例如,两个多边形相交于一条线或一个点的接触几何图形的交集可能会产生不同的类型。