GDAL_POLYGONIZE(1)
πΈ NAME πΈ
okay so bestie, welcome to the GDAL_POLYGONIZE(1) manual page. gdal_polygonize is the utility that produces a polygon feature layer from a raster. π
β¨
π SYNOPSIS π
gdal_polygonize.py [-8] [-nomask] [-mask filename] <raster_file> [-b band]
[-q] [-f ogr_format] <out_file> [layer] [fieldname]
π DESCRIPTION π
Bestie, the tea is this: this utility creates vector polygons for all connected regions of pixels in the raster sharing a common pixel value. Each polygon is created with an attribute indicating the pixel value of that polygon. A raster mask may also be provided to determine which pixels are eligible for processing. π¦
The utility will create the output vector datasource if it does not already exist, defaulting to GML format. No cap.
Also, it's based on the :GDALPolygonize() function β that function has additional details on the algorithm. iykyk. π
Here are all the flags and args in the original order, because we do not skip the "boring" parts in this group chat: π«Ά
-8β Use 8 connectedness. Default is 4 connectedness.-nomaskβ Do not use the default validity mask for the input band (such as nodata, or alpha masks).-mask<filename>β Use the first band of the specified file as a validity mask (zero is invalid, non-zero is valid). If not specified, the default validity mask for the input band (such as nodata, or alpha masks) will be used (unless-nomaskis specified).<raster_file>β The source raster file from which polygons are derived.-b<band>β The band on<raster_file>to build the polygons from. Starting with GDAL 2.2, the value can also be set to"mask", to indicate that the mask band of the first band must be used (or"mask,band_number"for the mask of a specified band).-f<ogr_format>β Select the output format. Starting with GDAL 2.3, if not specified, the format is guessed from the extension (previously wasGML). Use the short format name.<out_file>β The destination vector file to which the polygons will be written.<layer>β The name of the layer created to hold the polygon features.<fieldname>β The name of the field to create (defaults to"DN").-qβ The script runs in quiet mode. The progress monitor is suppressed and routine messages are not displayed.
π AUTHOR π
Frank Warmerdam <warmerdam@pobox.com> π
π COPYRIGHT π
1998-2026 β that's the copyright range, bestie. π
β¨ Signing off from the GDAL_POLYGONIZE(1) manual page β source/version GDAL, dated Jan 08, 2026. Mwah ππ«Ά
π¦ where this page comes from
- epel 9: gdal3.4 3.4.3-5.el9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms