Use of this function requires a license for Whitebox Workflows for Python Professional (WbW-Pro). Please visit www.whiteboxgeo.com to purchase a license.

The sieve function removes individual objects in a class map that are less than a threshold area, in grid cells. Pixels contained within the removed small polygons will be replaced with the nearest remaining class value. This operation is common when generalizing class maps, e.g. those derived from an image classification. Thus, this tool provides a similar function to the generalize_classified_raster and generalize_with_similarity functions.

See Also:

generalize_classified_raster, generalize_with_similarity

Function Signature

def sieve(self, input_raster: Raster, threshold: int = 1, zero_background: bool = False) -> Raster: ...

Project Links

WbW Homepage User Manual Support WbW