lazyslide.cv.merge_connected_polygons#
- merge_connected_polygons(gdf, prob_col=None, buffer_px=0)#
Merge polygons in a GeoDataFrame while optionally considering a probability column and applying a buffer.
- Parameters:
- gdf
GeoDataFrame GeoDataFrame containing the input geometries to merge.
- prob_colstr, optional
Name of the column containing the probability values. Default is None.
- buffer_pxfloat, optional
Buffer distance applied during preprocessing of the geometry. Default is 0.
- gdf
- Returns:
GeoDataFrameGeoDataFrame containing the merged geometries, along with probability data if the prob_col parameter is set.