lazyslide.cv.merge_polygons

Contents

lazyslide.cv.merge_polygons#

merge_polygons(gdf, prob_col=None, buffer_px=0)#

Merge polygons in a GeoDataFrame while optionally considering a probability column and applying a buffer.

Parameters:
gdfGeoDataFrame

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.

Returns:
GeoDataFrame

GeoDataFrame containing the merged geometries, along with probability data if the prob_col parameter is set.