⚠️ Our 0.1 release refactored several early-development functions for long-term stability, to update your code see here. ⚠️
Future changes will come with deprecation warnings! 🙂

geoutils.Raster.polygonize

geoutils.Raster.polygonize#

Raster.polygonize(target_values='all')[source]#

Polygonize the raster into a vector.

Parameters:

target_values (Union[int, float, integer[Any], floating[Any], tuple[Union[int, float, integer[Any], floating[Any]], Union[int, float, integer[Any], floating[Any]]], list[Union[int, float, integer[Any], floating[Any]]], ndarray[Any, dtype[Union[floating[Any], integer[Any]]]], Literal['all']]) – Value or range of values of the raster from which to create geometries (defaults to ‘all’, for which all unique pixel values of the raster are used).

Return type:

Vector

Returns:

Vector containing the polygonized geometries.