.\" 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-FOOTPRINT" "1" "May 06, 2025" "" "GDAL" .SH NAME gdal-raster-footprint \- Compute the footprint of a raster dataset .sp Added in version 3.11. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX Usage: gdal raster footprint [OPTIONS] Compute the footprint of a raster dataset. Positional arguments: \-i, \-\-input Input raster dataset [required] \-o, \-\-output Output vector dataset (created by algorithm) [required] Common Options: \-h, \-\-help Display help message and exit \-\-json\-usage Display usage as JSON document and exit \-\-config = Configuration option [may be repeated] \-\-progress Display progress bar Options: \-f, \-\-of, \-\-format, \-\-output\-format Output format \-\-output\-layer Output layer name (default: footprint) \-\-co, \-\-creation\-option = Creation option [may be repeated] \-\-lco, \-\-layer\-creation\-option = Layer creation option [may be repeated] \-\-append Whether to append to an existing dataset \-\-overwrite Whether overwriting existing output is allowed \-b, \-\-band Input band(s) (1\-based index) [may be repeated] \-\-combine\-bands Defines how the mask bands of the selected bands are combined to generate a single mask band, before being vectorized.. COMBINE\-BANDS=union|intersection (default: union) \-\-overview Which overview level of source file must be used Mutually exclusive with \-\-src\-nodata \-\-src\-nodata Set nodata values for input bands. [1.. values] Mutually exclusive with \-\-overview \-\-coordinate\-system Target coordinate system. COORDINATE\-SYSTEM=georeferenced|pixel \-\-dst\-crs Destination CRS \-\-split\-multipolygons Whether to split multipolygons as several features each with one single polygon \-\-convex\-hull Whether to compute the convex hull of the footprint \-\-densify\-distance Maximum distance between 2 consecutive points of the output geometry. \-\-simplify\-tolerance Tolerance used to merge consecutive points of the output geometry. \-\-min\-ring\-area Minimum value for the area of a ring \-\-max\-points Maximum number of points of each output geometry (default: 100) \-\-location\-field Name of the field where the path of the input dataset will be stored. (default: location) Mutually exclusive with \-\-no\-location\-field \-\-no\-location\-field Disable creating a field with the path of the input dataset Mutually exclusive with \-\-location\-field \-\-absolute\-path Whether the path to the input dataset should be stored as an absolute path Advanced Options: \-\-oo, \-\-open\-option = Open options [may be repeated] \-\-if, \-\-input\-format Input formats [may be repeated] .EE .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fBgdal raster footprint\fP computes the footprint of a raster file, taking into account nodata values (or more generally the mask band attached to the raster bands), and generating polygons/multipolygons corresponding to areas where pixels are valid, and write to an output vector file. .sp The following options are available: .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 \-\-co = 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 \-\-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 \-\-output\-layer Output layer name. Defaults to \fBfootprint\fP\&. .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 \-\-append Whether appending features to existing layer(s) is allowed .UNINDENT .INDENT 0.0 .TP .B \-b Select an input to be processed. Bands are numbered from 1. Multiple \fI\%\-b\fP switches may be used to select a set of input bands. If not specified, all bands are taken into account. The way multiple bands are combined is controlled by \fI\%\-\-combine\-bands\fP .UNINDENT .INDENT 0.0 .TP .B \-\-combine\-bands union|intersection Defines how the mask bands of the selected bands are combined to generate a single mask band, before being vectorized. The default value is \fBunion\fP: that is a pixel is valid if it is valid at least for one of the selected bands. \fBintersection\fP means that a pixel is valid only if it is valid for all selected bands. .UNINDENT .INDENT 0.0 .TP .B \-\-ovr To specify which overview level of source file must be used, when overviews are available on the source raster. By default the full resolution level is used. The index is 0\-based, that is 0 means the first overview level. This option is mutually exclusive with \fI\%\-\-src\-nodata\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-src\-nodata Set nodata values for input bands (different values can be supplied for each band). If a single value is specified, it applies to all selected bands. If more than one value is supplied, there should be as many values as the number of selected bands, and all values should be quoted to keep them together as a single operating system argument. If the option is not specified, the intrinsic mask band of each selected bands will be used. .UNINDENT .INDENT 0.0 .TP .B \-\-coordinate\-system pixel|georeferenced Target coordinate system. By default if the input dataset is georeferenced, \fBgeoreferenced\fP is implied, that is the footprint geometry will be expressed as coordinates in the CRS of the raster (or the one specified with \fI\%\-\-dst\-crs\fP). If specifying \fBpixel\fP, the coordinates of the footprint geometry are column and line indices. .UNINDENT .INDENT 0.0 .TP .B \-\-dst\-crs Target CRS of the output file. The may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT. Specifying this option implies \fB\-\-coordinate\-system=georeferenced\fP\&. The footprint is reprojected from the CRS of the source raster to the specified CRS. .UNINDENT .INDENT 0.0 .TP .B \-\-split\-multipolygons When specified, multipolygons are split as several features each with one single polygon. .UNINDENT .INDENT 0.0 .TP .B \-\-convex\-hull When specified, the convex hull of (multi)polygons is computed. .UNINDENT .INDENT 0.0 .TP .B \-\-densify\-distance The specified value of this option is the maximum distance between 2 consecutive points of the output geometry. The unit of the distance is in pixels if \fI\%\-\-coordinate\-system\fP equals \fBpixel\fP, or otherwise in georeferenced units of the source raster. This option is applied before the reprojection implied by \fI\%\-\-dst\-crs\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-simplify\-tolerance The specified value of this option is the tolerance used to merge consecutive points of the output geometry using the \fI\%OGRGeometry::Simplify()\fP method. The unit of the distance is in pixels if \fI\%\-\-coordinate\-system\fP equals \fBpixel\fP, or otherwise in georeferenced units of the target vector dataset. This option is applied after the reprojection implied by \fI\%\-\-dst\-crs\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-min\-ring\-area Minimum value for the area of a ring The unit of the area is in square pixels if \fI\%\-\-coordinate\-system\fP equals \fBpixel\fP, or otherwise in georeferenced units of the target vector dataset. This option is applied after the reprojection implied by \fI\%\-\-dst\-crs\fP .UNINDENT .INDENT 0.0 .TP .B \-\-max\-points |unlimited Maximum number of points of each output geometry (not counting the closing point of each ring, which is always identical to the first point). The default value is 100. \fBunlimited\fP can be used to remove that limitation. .UNINDENT .INDENT 0.0 .TP .B \-\-location\-field Specifies the name of the field in the resulting vector dataset where the path of the input dataset will be stored. The default field name is \(dqlocation\(dq. To prevent writing the path of the input dataset, use \fI\%\-\-no\-location\-field\fP .UNINDENT .INDENT 0.0 .TP .B \-\-no\-location\-field Turns off the writing of the path of the input dataset as a field in the output vector dataset. .UNINDENT .INDENT 0.0 .TP .B \-\-absolute\-path Enables writing the absolute path of the input dataset. By default, the filename is written in the location field exactly as specified on the command line. .UNINDENT .sp Post\-vectorization geometric operations are applied in the following order: .INDENT 0.0 .IP \(bu 2 optional splitting (\fI\%\-\-split\-multipolygons\fP) .IP \(bu 2 optional densification (\fI\%\-\-densify\-distance\fP) .IP \(bu 2 optional reprojection (\fI\%\-\-dst\-crs\fP) .IP \(bu 2 optional filtering by minimum ring area (\fI\%\-\-min\-ring\-area\fP) .IP \(bu 2 optional application of convex hull (\fI\%\-\-convex\-hull\fP) .IP \(bu 2 optional simplification (\fI\%\-\-simplify\-tolerance\fP) .IP \(bu 2 limitation of number of points (\fI\%\-\-max\-points\fP) .UNINDENT .SH EXAMPLES .SS Example 1: Write the footprint of a GeoTIFF file into a GeoJSON file. .INDENT 0.0 .INDENT 3.5 .sp .EX gdal raster footprint my_raster.tif footprint.geojson .EE .UNINDENT .UNINDENT .SH AUTHOR Even Rouault .SH COPYRIGHT 1998-2025 .\" Generated by docutils manpage writer. .