.TH "gdal_utilities" 1 "Thu Apr 30 2020" "GDAL" \" -*- nroff -*- .ad l .nh .SH NAME gdal_utilities \- GDAL Utilities A collection of GDAL related programs\&. .PP The following utility programs are distributed with GDAL\&. .PP .PD 0 .IP "\(bu" 2 \fBgdalinfo\fP - Report information about a file\&. .IP "\(bu" 2 \fBgdal_translate\fP - Copy a raster file, with control of output format\&. .IP "\(bu" 2 \fBgdaladdo\fP - Add overviews to a file\&. .IP "\(bu" 2 \fBgdalwarp\fP - Warp an image into a new coordinate system\&. .IP "\(bu" 2 \fBgdaltindex\fP - Build a MapServer raster tileindex\&. .IP "\(bu" 2 \fBgdalbuildvrt\fP - Build a VRT from a list of datasets\&. .IP "\(bu" 2 \fBgdal_contour\fP - Contours from DEM\&. .IP "\(bu" 2 \fBgdaldem\fP - Tools to analyze and visualize DEMs\&. .IP "\(bu" 2 \fBrgb2pct\fP - Convert a 24bit RGB image to 8bit paletted\&. .IP "\(bu" 2 \fBpct2rgb\fP - Convert an 8bit paletted image to 24bit RGB\&. .IP "\(bu" 2 \fBgdal_merge\fP - Build a quick mosaic from a set of images\&. .IP "\(bu" 2 \fBgdal2tiles\fP - Create a TMS tile structure, KML and simple web viewer\&. .IP "\(bu" 2 \fBgdal_rasterize\fP - Rasterize vectors into raster file\&. .IP "\(bu" 2 \fBgdaltransform\fP - Transform coordinates\&. .IP "\(bu" 2 \fBnearblack\fP - Convert nearly black/white borders to exact value\&. .IP "\(bu" 2 \fBgdal_retile\fP - Retiles a set of tiles and/or build tiled pyramid levels\&. .IP "\(bu" 2 \fBgdal_grid\fP - Create raster from the scattered data\&. .IP "\(bu" 2 \fBgdal_proximity\fP - Compute a raster proximity map\&. .IP "\(bu" 2 \fBgdal_polygonize\fP - Generate polygons from raster\&. .IP "\(bu" 2 \fBgdal_sieve\fP - Raster Sieve filter\&. .IP "\(bu" 2 \fBgdal_fillnodata\fP - Interpolate in nodata regions\&. .IP "\(bu" 2 \fBgdallocationinfo\fP - Query raster at a location\&. .IP "\(bu" 2 \fBgdalsrsinfo\fP - Report a given SRS in different formats\&. (GDAL >= 1\&.9\&.0) .IP "\(bu" 2 \fBgdalmove\fP - Transform the coordinate system of a file (GDAL >= 1\&.10) .IP "\(bu" 2 \fBgdal_edit\fP - Edit in place various information of an existing GDAL dataset (projection, geotransform, nodata, metadata) .IP "\(bu" 2 \fBgdal_calc\fP - Command line raster calculator with numpy syntax .IP "\(bu" 2 \fBgdal_pansharpen\fP - Perform a pansharpen operation\&. .IP "\(bu" 2 \fBgdal-config\fP - Get options required to build software using GDAL\&. .IP "\(bu" 2 \fBgdalmanage\fP - Identify, copy, rename and delete raster\&. .IP "\(bu" 2 \fBgdalcompare\fP - Compare two images and report on differences\&. .PP .SH "Creating New Files" .PP Access an existing file to read it is generally quite simple\&. Just indicate the name of the file or dataset on the command line\&. However, creating a file is more complicated\&. It may be necessary to indicate the the format to create, various creation options affecting how it will be created and perhaps a coordinate system to be assigned\&. Many of these options are handled similarly by different GDAL utilities, and are introduced here\&. .PP .IP "\fB\fB-of\fP \fIformat\fP\fP" 1c Select the format to create the new file as\&. The formats are assigned short names such as GTiff (for GeoTIFF) or HFA (for Erdas Imagine)\&. The list of all format codes can be listed with the \fB--formats\fP switch\&. Only formats list as '(rw)' (read-write) can be written\&. .PP Starting with GDAL 2\&.3, if not specified, the format is guessed from the extension (previously was generally GTiff for raster, or ESRI Shapefile for vector)\&. .PP .IP "\fB\fB-co\fP \fINAME=VALUE\fP\fP" 1c 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\&. .PP 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 '--format ' command line option but the web page for the format is the definitive source of information on driver creation options\&. See \fCformat specific documentation for legal creation options for each format\fP .PP .PP .IP "\fB\fB-a_srs\fP \fISRS\fP\fP" 1c Several utilities, (gdal_translate and gdalwarp) include the ability to specify coordinate systems with command line options like \fB-a_srs\fP (assign SRS to output), \fB-s_srs\fP (source SRS) and \fB-t_srs\fP (target SRS)\&. .PP These utilities allow the coordinate system (SRS = spatial reference system) to be assigned in a variety of formats\&. .PP .PP .PD 0 .IP "\(bu" 2 \fBNAD27\fP/\fBNAD83\fP/\fBWGS84\fP/\fBWGS72\fP: These common geographic (lat/long) coordinate systems can be used directly by these names\&. .PP .IP "\(bu" 2 \fBEPSG:\fP\fIn\fP: Coordinate systems (projected or geographic) can be selected based on their EPSG codes, for instance EPSG:27700 is the British National Grid\&. A list of EPSG coordinate systems can be found in the GDAL data files gcs\&.csv and pcs\&.csv\&. .PP .IP "\(bu" 2 \fIPROJ\&.4 Definitions\fP: A PROJ\&.4 definition string can be used as a coordinate system\&. For instance '+proj=utm +zone=11 +datum=WGS84'\&. Take care to keep the proj\&.4 string together as a single argument to the command (usually by double quoting)\&. .PP .PP .IP "\(bu" 2 \fIOpenGIS Well Known Text\fP: The Open GIS Consortium has defined a textual format for describing coordinate systems as part of the Simple Features specifications\&. This format is the internal working format for coordinate systems used in GDAL\&. The name of a file containing a WKT coordinate system definition may be used a coordinate system argument, or the entire coordinate system itself may be used as a command line option (though escaping all the quotes in WKT is quite challenging)\&. .PP .PP .IP "\(bu" 2 \fIESRI Well Known Text\fP: ESRI uses a slight variation on OGC WKT format in their ArcGIS product (ArcGIS \&.prj files), and these may be used in a similar manner to WKT files, but the filename should be prefixed with \fBESRI::\fP\&. For example \fB'ESRI::NAD 1927 StatePlane Wyoming West FIPS 4904\&.prj'\fP\&. .PP .PP .IP "\(bu" 2 \fISpatial References from URLs\fP: For example http://spatialreference.org/ref/user/north-pacific-albers-conic-equal-area/\&. .PP .PP .IP "\(bu" 2 \fIfilename\fP: The name of a file containing WKT, PROJ\&.4 strings, or XML/GML coordinate system definitions can be provided\&. .PP .PP .PP .PP .SH "General Command Line Switches" .PP All GDAL command line utility programs support the following 'general' options\&. .PP .IP "\fB\fB--version\fP\fP" 1c Report the version of GDAL and exit\&. .PP .IP "\fB\fB--formats\fP\fP" 1c List all raster formats supported by this GDAL build (read-only and read-write) and exit\&. The format support is indicated as follows: 'ro' is read-only driver; 'rw' is read or write (i\&.e\&. supports CreateCopy); 'rw+' is read, write and update (i\&.e\&. supports Create)\&. A 'v' is appended for formats supporting virtual IO (/vsimem, /vsigzip, /vsizip, etc)\&. A 's' is appended for formats supporting subdatasets\&. Note: The valid formats for the output of gdalwarp are formats that support the Create() method (marked as rw+), not just the CreateCopy() method\&. .PP .IP "\fB\fB--format\fP \fIformat\fP\fP" 1c List detailed information about a single format driver\&. The \fIformat\fP should be the short name reported in the \fB--formats\fP list, such as GTiff\&. .PP .IP "\fB\fB--optfile\fP \fIfile\fP\fP" 1c Read the named file and substitute the contents into the command line options list\&. Lines beginning with # will be ignored\&. Multi-word arguments may be kept together with double quotes\&. .PP .IP "\fB\fB--config\fP \fIkey value\fP\fP" 1c Sets the named \fCconfiguration keyword\fP to the given value, as opposed to setting them as environment variables\&. Some common configuration keywords are GDAL_CACHEMAX (memory used internally for caching in megabytes) and GDAL_DATA (path of the GDAL 'data' directory)\&. Individual drivers may be influenced by other configuration options\&. .PP .IP "\fB\fB--debug\fP \fIvalue\fP\fP" 1c Control what debugging messages are emitted\&. A value of \fION\fP will enable all debug messages\&. A value of \fIOFF\fP will disable all debug messages\&. Another value will select only debug messages containing that string in the debug prefix code\&. .PP .IP "\fB\fB--help-general\fP\fP" 1c Gives a brief usage message for the generic GDAL command line options and exit\&. .PP .PP .PP