.\" 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_FOOTPRINT" "1" "Aug 13, 2024" "" "GDAL" .SH NAME gdal_footprint \- Compute footprint of a raster. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gdal_footprint [\-\-help] [\-\-help\-general] [\-b ]... [\-combine_bands union|intersection] [\-oo =]... [\-ovr ] [\-srcnodata \(dq[ ]...\(dq] [\-t_cs pixel|georef] [\-t_srs ] [\-split_polys] [\-convex_hull] [\-densify ] [\-simplify ] [\-min_ring_area ] [\-max_points |unlimited] [\-of ] [\-lyr_name ] [\-location_field_name ] [\-no_location] [\-write_absolute_path] [\-dsco =]... [\-lco =]... [\-overwrite] [\-q] .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp The \fBgdal_footprint\fP utility can be used to compute 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 \fBnearblack\fP utility may be run as a pre\-processing step to generate proper mask bands. .INDENT 0.0 .TP .B \-\-help Show this help message and exit .UNINDENT .INDENT 0.0 .TP .B \-\-help\-general Gives a brief usage message for the generic GDAL commandline options and exit. .UNINDENT .INDENT 0.0 .TP .B \-b Band(s) of interest. Between 1 and the number of bands of the raster. May be specified multiple times. 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 ifit 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\%\-srcnodata\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-srcnodata \(dq[ ]...\(dq 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 \-t_cs pixel|georef Target coordinate system. By default if the input dataset is georeferenced, \fBgeoref\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\%\-t_srs\fP). If specifying \fBpixel\fP, the coordinates of the footprint geometry are column and line indices. .UNINDENT .INDENT 0.0 .TP .B \-t_srs 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 \-t_cs georef The footprint is reprojected from the CRS of the source raster to the specified CRS. .UNINDENT .INDENT 0.0 .TP .B \-split_polys 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 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\%\-t_cs\fP equals \fBpixel\fP, or otherwise in georeferenced units of the source raster. This option is applied before the reprojection implied by \fI\%\-t_srs\fP .UNINDENT .INDENT 0.0 .TP .B \-simplify 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\%\-t_cs\fP equals \fBpixel\fP, or otherwise in georeferenced units of the target vector dataset. This option is applied after the reprojection implied by \fI\%\-t_srs\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\%\-t_cs\fP equals \fBpixel\fP, or otherwise in georeferenced units of the target vector dataset. This option is applied after the reprojection implied by \fI\%\-t_srs\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 \-q Suppress progress monitor and other non\-error output. .UNINDENT .INDENT 0.0 .TP .B \-oo = Dataset open option (format specific) .UNINDENT .INDENT 0.0 .TP .B \-of Select the output format. Use the short format name. Guessed from the file extension if not specified .UNINDENT .INDENT 0.0 .TP .B \-location_field_name New in version 3.9.0. .sp 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\fP .UNINDENT .INDENT 0.0 .TP .B \-no_location New in version 3.9.0. .sp 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 \-write_absolute_path New in version 3.9.0. .sp 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 .INDENT 0.0 .TP .B \-lco = Layer creation option (format specific) .UNINDENT .INDENT 0.0 .TP .B \-dsco = Dataset creation option (format specific) .UNINDENT .INDENT 0.0 .TP .B \-lyr_name Name of the target layer. \fBfootprint\fP if not specified. .UNINDENT .INDENT 0.0 .TP .B \-overwrite Overwrite the target layer if it exists. .UNINDENT .INDENT 0.0 .TP .B The source raster file name. .UNINDENT .INDENT 0.0 .TP .B The destination vector file name. If the file and the output layer exist, the new footprint is appended to them, unless \fI\%\-overwrite\fP is used. .UNINDENT .sp Post\-vectorization geometric operations are applied in the following order: .INDENT 0.0 .IP \(bu 2 optional splitting (\fI\%\-split_polys\fP) .IP \(bu 2 optional densification (\fI\%\-densify\fP) .IP \(bu 2 optional reprojection (\fI\%\-t_srs\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\fP) .IP \(bu 2 limitation of number of points (\fI\%\-max_points\fP) .UNINDENT .SH C API .sp This utility is also callable from C with \fI\%GDALFootprint()\fP\&. .SH EXAMPLES .INDENT 0.0 .IP \(bu 2 Compute the footprint of a GeoTIFF file as a GeoJSON file using WGS 84 longitude, latitude coordinates .INDENT 2.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C gdal_footprint \-t_srs EPSG:4326 input.tif output.geojson .ft P .fi .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH AUTHOR Even Rouault .SH COPYRIGHT 1998-2024 .\" Generated by docutils manpage writer. .