.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "GDAL-RASTER-AS-FEATURES" "1" "Aug 18, 2026" "" "GDAL" .SH NAME gdal-raster-as-features \- Create features representing the pixels of a raster .sp Added in version 3.12. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX Usage: gdal raster as\-features [OPTIONS] Create features from pixels of a raster dataset Positional arguments: \-i, \-\-input Input raster datasets [required] [not available in pipelines] \-o, \-\-output Output vector dataset [required] [not available in pipelines] Common Options: \-h, \-\-help Display help message and exit \-\-json\-usage Display usage as JSON document and exit \-\-config = Configuration option [may be repeated] Options: \-f, \-\-of, \-\-format, \-\-output\-format Output format (\(dqGDALG\(dq allowed) [not available in pipelines] \-\-co, \-\-creation\-option = Creation option [may be repeated] [not available in pipelines] \-\-lco, \-\-layer\-creation\-option = Layer creation option [may be repeated] [not available in pipelines] \-\-overwrite Whether overwriting existing output dataset is allowed [not available in pipelines] \-\-update Whether to open existing dataset in update mode [not available in pipelines] \-\-overwrite\-layer Whether overwriting existing output layer is allowed [not available in pipelines] \-\-append Whether appending to existing layer is allowed [not available in pipelines] \-\-output\-layer Output layer name [not available in pipelines] \-b, \-\-band Input band(s) (1\-based index) [may be repeated] \-\-geometry\-type Geometry type. GEOMETRY\-TYPE=none|point|polygon (default: none) \-\-skip\-nodata Omit NoData pixels from the result \-\-include\-xy Include fields for cell center coordinates \-\-include\-row\-col Include columns for row and column Advanced Options: \-\-if, \-\-input\-format Input formats [may be repeated] [not available in pipelines] \-\-oo, \-\-open\-option = Open options [may be repeated] [not available in pipelines] \-\-output\-oo, \-\-output\-open\-option = Output open options [may be repeated] [not available in pipelines] .EE .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fBgdal raster as\-features\fP creates features representing the pixels in a raster dataset. Features may be created as polygons, points, or with no geometry at all. Unlike \fI\%gdal raster polygonize\fP, adjacent pixels having the same values are not combined. .sp This algorithm can be part of a \fI\%gdal pipeline\fP\&. .SH PROGRAM-SPECIFIC OPTIONS .INDENT 0.0 .TP .B \-b, \-\-band Specifies the bands for which pixel values should be added as fields of the created features. By default, values will be added for all bands. .UNINDENT .INDENT 0.0 .TP .B \-\-geometry\-type Specifies the geometry type of the created features. Options available are \(dqnone\(dq (default), \(dqpoint\(dq, or \(dqpolygon\(dq. .UNINDENT .INDENT 0.0 .TP .B \-\-include\-row\-col If set, \fBROW\fP and \fBCOL\fP fields will be added with the cell positions. .UNINDENT .INDENT 0.0 .TP .B \-\-include\-xy If set, \fBCENTER_X\fP and \fBCENTER_Y\fP fields will be added with the center coordinates of each pixel. .UNINDENT .INDENT 0.0 .TP .B \-\-output\-layer Provides a name for the output vector layer. Defaults to \(dqpixels\(dq. .UNINDENT .INDENT 0.0 .TP .B \-\-skip\-nodata If set, no features will be emitted for pixels equal to the NoData value. .UNINDENT .SH STANDARD OPTIONS .INDENT 0.0 .TP .B \-\-append Whether appending features to existing layer(s) is allowed. This also creates the output dataset if it does not exist yet. .UNINDENT .INDENT 0.0 .TP .B \-\-co, \-\-creation\-option = Many formats have one or more optional creation options that can be used to control particulars about the file created. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled. .sp May be repeated. .sp The creation options available vary by format driver, and some simple formats have no creation options at all. A list of options supported for a format can be listed with the \fI\%\-\-formats\fP command line option but the documentation for the format is the definitive source of information on driver creation options. See \fI\%Raster drivers\fP format specific documentation for legal creation options for each format. .UNINDENT .INDENT 0.0 .TP .B \-\-if, \-\-input\-format Format/driver name to be attempted to open the input file(s). It is generally not necessary to specify it, but it can be used to skip automatic driver detection, when it fails to select the appropriate driver. This option can be repeated several times to specify several candidate drivers. Note that it does not force those drivers to open the dataset. In particular, some drivers have requirements on file extensions. .sp May be repeated. .UNINDENT .INDENT 0.0 .TP .B \-\-lco, \-\-layer\-creation\-option = Many formats have one or more optional layer creation options that can be used to control particulars about the layer created. For instance, the GeoPackage driver supports layer creation options to control the feature identifier or geometry column name, setting the identifier or description, etc. .sp May be repeated. .sp The layer creation options available vary by format driver, and some simple formats have no layer creation options at all. A list of options supported for a format can be listed with the \fI\%\-\-formats\fP command line option but the documentation for the format is the definitive source of information on driver creation options. See \fI\%Vector drivers\fP format specific documentation for legal creation options for each format. .sp Note that layer creation options are different from dataset creation options. .UNINDENT .INDENT 0.0 .TP .B \-\-oo, \-\-open\-option = Dataset open option (format specific). .sp May be repeated. .UNINDENT .INDENT 0.0 .TP .B \-f, \-\-of, \-\-format, \-\-output\-format Which output vector format to use. Allowed values may be given by \fBgdal \-\-formats | grep vector | grep rw | sort\fP .UNINDENT .INDENT 0.0 .TP .B \-\-output\-open\-option, \-\-output\-oo = Added in version 3.12. .sp Dataset open option for output dataset (format specific). .sp May be repeated. .UNINDENT .INDENT 0.0 .TP .B \-\-overwrite Allow program to overwrite existing target file or dataset. Otherwise, by default, \fBgdal\fP errors out if the target file or dataset already exists. .UNINDENT .INDENT 0.0 .TP .B \-\-overwrite\-layer Whether overwriting the existing output vector layer is allowed. .UNINDENT .INDENT 0.0 .TP .B \-\-update Whether to open an existing output dataset in update mode. .UNINDENT .SH RETURN STATUS CODE .sp The program returns status code 0 in case of success, and non\-zero in case of error (non\-blocking errors emitted as warnings are considered as a successful execution). .SH EXAMPLES .SS Example 1: Create points at the center of pixels having a value less than 150 .INDENT 0.0 .INDENT 3.5 .sp .EX gdal pipeline read input.tif ! reclassify \-m \(dq[\-inf, 150)=1; DEFAULT=NO_DATA\(dq ! as\-features \-\-geometry\-type point \-\-skip\-nodata ! write out.shp .EE .UNINDENT .UNINDENT .SS Example 2: Create a polygon grid dividing the globe into 1\-degree chunks .INDENT 0.0 .INDENT 3.5 .sp .EX gdal pipeline create \-\-bbox \-180,\-90,180,90 \-\-size 360,180 ! as\-features \-\-geometry\-type polygon ! write grid.shp .EE .UNINDENT .UNINDENT .SH AUTHOR Dan Baston .SH COPYRIGHT 1998-2026 .\" Generated by docutils manpage writer. .