geoutils.Raster.polygonize#
- Raster.polygonize(target_values='all', data_column_name='id')[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).data_column_name (
str
) – Data column name to be associated with target values in the output vector (defaults to “id”).
- Return type:
- Returns:
Vector containing the polygonized geometries associated to target values.