Raster To Polygons
Turns areas of connected cells with the same value into polygons, each carrying that value.
Pitfall. Continuous rasters (elevation, imagery) give one polygon per cell or tiny group of cells; classify or round values first.
Pitfall. Engines differ on floating-point values; some truncate them to integers first.
| Also called | Polygonize, Raster To Polygon, raster to vector, vectorize |
|---|---|
| Group | conversion/raster-to-vector |
| Checks | raster.nodata, geometry.valid |
| Pitfalls | 2 listed above |
| Columbus tool | Not stated |
| Notes | Not stated |
| Status | active |
| Broader | Not stated |
| Narrower | Not stated |
| Related |
Parameters
| Name | Type | Required | Default | Values | Note |
|---|---|---|---|---|---|
band | integer | no | 1 | Not stated | Not stated |
field | string | no | Not stated | Not stated | Name of the attribute that holds each polygon's cell value. |
eight_connected | boolean | no | no | Not stated | Join cells that touch only at a corner (8-connectedness) instead of only along edges. |
Inputs and outputs
| Direction | Name | Type | Geometry | Note |
|---|---|---|---|---|
| Input | raster | raster | Not stated | Not stated |
| Output | output | vector | polygon | Not stated |
In each engine
| Engine | Tool | Parameters | Differences |
|---|---|---|---|
gdal | gdal raster polygonize |
| None noted |
grass | r.to.vect |
| None noted
Preset: {"type":"area"} |
postgis-raster | st_dumpaspolygons |
|
|
qgis | gdal:polygonize |
| None noted |
rasterio | rasterio.features.shapes |
|
|
terra | terra::as.polygons |
|
|
whiteboxtools | RasterToVectorPolygons |
| None noted |