.TH "gdalwarp" 1 "Mon Aug 26 2013" "GDAL" \" -*- nroff -*-
gdalwarp \- .TH "gdalwarp" 1 "Mon Aug 26 2013" "GDAL" \" -*- nroff -*-
gdalwarp \- image reprojection and warping utility
gdalwarp [--help-general] [--formats]
[-s_srs srs_def] [-t_srs srs_def] [-to "NAME=VALUE"]
[-order n | -tps | -rpc | -geoloc] [-et err_threshold]
[-refine_gcps tolerance [minimum_gcps]]
[-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height]
[-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt Byte/Int16]
[-srcnodata "value [value...]"] [-dstnodata "value [value...]"] -dstalpha
[-r resampling_method] [-wm memory_in_mb] [-multi] [-q]
[-cutline datasource] [-cl layer] [-cwhere expression]
[-csql statement] [-cblend dist_in_pixels] [-crop_to_cutline]
[-of format] [-co "NAME=VALUE"]* [-overwrite]
[-nomd] [-cvmd meta_conflict_value] [-setci]
The gdalwarp utility is an image mosaicing, reprojection and warping utility. The program can reproject to any supported projection, and can also apply GCPs stored with the image if the image is 'raw' with control information.
.IP "\fB\fB-s_srs\fP \fIsrs def\fP:\fP" 1c
source spatial reference set. The coordinate systems that can be passed are anything supported by the OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes (ie. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file containing well known text.
.IP "\fB\fB-t_srs\fP \fIsrs_def\fP:\fP" 1c
target spatial reference set. The coordinate systems that can be passed are anything supported by the OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes (ie. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file containing well known text.
.IP "\fB\fB-to\fP \fINAME=VALUE\fP:\fP" 1c
set a transformer option suitable to pass to GDALCreateGenImgProjTransformer2().
.IP "\fB\fB-order\fP \fIn\fP:\fP" 1c
order of polynomial used for warping (1 to 3). The default is to select a polynomial order based on the number of GCPs.
.IP "\fB\fB-tps\fP:\fP" 1c
Force use of thin plate spline transformer based on available GCPs.
.IP "\fB\fB-rpc\fP: \fP" 1c
Force use of RPCs.
.IP "\fB\fB-geoloc\fP:\fP" 1c
Force use of Geolocation Arrays.
.IP "\fB\fB-et\fP \fIerr_threshold\fP:\fP" 1c
error threshold for transformation approximation (in pixel units - defaults to 0.125).
.IP "\fB\fB-refine_gcps\fP \fItolerance minimum_gcps\fP:\fP" 1c
(GDAL >= 1.9.0) refines the GCPs by automatically eliminating outliers. Outliers will be eliminated until minimum_gcps are left or when no outliers can be detected. The tolerance is passed to adjust when a GCP will be eliminated. Not that GCP refinement only works with polynomial interpolation. The tolerance is in pixel units if no projection is available, otherwise it is in SRS units. If minimum_gcps is not provided, the minimum GCPs according to the polynomial model is used.
.IP "\fB\fB-te\fP \fIxmin ymin xmax ymax\fP:\fP" 1c
set georeferenced extents of output file to be created (in target SRS).
.IP "\fB\fB-tr\fP \fIxres yres\fP:\fP" 1c
set output file resolution (in target georeferenced units)
.IP "\fB\fB-tap\fP:\fP" 1c
(GDAL >= 1.8.0) (target aligned pixels) align the coordinates of the extent of the output file to the values of the -tr, such that the aligned extent includes the minimum extent.
.IP "\fB\fB-ts\fP \fIwidth height\fP:\fP" 1c
set output file size in pixels and lines. If width or height is set to 0, the other dimension will be guessed from the computed resolution. Note that -ts cannot be used with -tr
.IP "\fB\fB-wo\fP \fI'NAME=VALUE'\fP:\fP" 1c
Set a warp options. The GDALWarpOptions::papszWarpOptions docs show all options. Multiple \fB-wo\fP options may be listed.
.IP "\fB\fB-ot\fP \fItype\fP:\fP" 1c
For the output bands to be of the indicated data type.
.IP "\fB\fB-wt\fP \fItype\fP:\fP" 1c
Working pixel data type. The data type of pixels in the source image and destination image buffers.
.IP "\fB\fB-r\fP \fIresampling_method\fP:\fP" 1c
Resampling method to use. Available methods are:
.IP "\fB\fBnear\fP: \fP" 1c
nearest neighbour resampling (default, fastest algorithm, worst interpolation quality).
.IP "\fB\fBbilinear\fP: \fP" 1c
.IP "\fB\fBcubic\fP: \fP" 1c
.IP "\fB\fBcubicspline\fP: \fP" 1c
cubic spline resampling.
.IP "\fB\fBlanczos\fP: \fP" 1c
Lanczos windowed sinc resampling.
.IP "\fB\fBaverage\fP: \fP" 1c
average resampling, computes the average of all non-NODATA contributing pixels. (GDAL >= 1.10.0)
.IP "\fB\fBmode\fP: \fP" 1c
mode resampling, selects the value which appears most often of all the sampled points. (GDAL >= 1.10.0)
.IP "\fB\fB-srcnodata\fP \fIvalue [value...]\fP:\fP" 1c
Set nodata masking values for input bands (different values can be supplied for each band). If more than one value is supplied all values should be quoted to keep them together as a single operating system argument. Masked values will not be used in interpolation. Use a value of \fCNone\fP to ignore intrinsic nodata settings on the source dataset.
.IP "\fB\fB-dstnodata\fP \fIvalue [value...]\fP:\fP" 1c
Set nodata values for output bands (different values can be supplied for each band). If more than one value is supplied all values should be quoted to keep them together as a single operating system argument. New files will be initialized to this value and if possible the nodata value will be recorded in the output file.
.IP "\fB\fB-dstalpha\fP:\fP" 1c
Create an output alpha band to identify nodata (unset/transparent) pixels.
.IP "\fB\fB-wm\fP \fImemory_in_mb\fP:\fP" 1c
Set the amount of memory (in megabytes) that the warp API is allowed to use for caching.
.IP "\fB\fB-multi\fP:\fP" 1c
Use multithreaded warping implementation. Multiple threads will be used to process chunks of image and perform input/output operation simultaneously.
.IP "\fB\fB-q\fP:\fP" 1c
.IP "\fB\fB-of\fP \fIformat\fP:\fP" 1c
Select the output format. The default is GeoTIFF (GTiff). Use the short format name.
.IP "\fB\fB-co\fP \fI'NAME=VALUE'\fP:\fP" 1c
passes a creation option to the output format driver. Multiple \fB-co\fP options may be listed. See format specific documentation for legal creation options for each format.
.IP "\fB\fB-cutline\fP \fIdatasource\fP:\fP" 1c
Enable use of a blend cutline from the name OGR support datasource.
.IP "\fB\fB-cl\fP \fIlayername\fP:\fP" 1c
Select the named layer from the cutline datasource.
.IP "\fB\fB-cwhere\fP \fIexpression\fP:\fP" 1c
Restrict desired cutline features based on attribute query.
.IP "\fB\fB-csql\fP \fIquery\fP:\fP" 1c
Select cutline features using an SQL query instead of from a layer with -cl.
.IP "\fB\fB-cblend\fP \fIdistance\fP:\fP" 1c
Set a blend distance to use to blend over cutlines (in pixels).
.IP "\fB\fB-crop_to_cutline\fP:\fP" 1c
(GDAL >= 1.8.0) Crop the extent of the target dataset to the extent of the cutline.
.IP "\fB\fB-overwrite\fP:\fP" 1c
(GDAL >= 1.8.0) Overwrite the target dataset if it already exists.
.IP "\fB\fB-nomd\fP:\fP" 1c
(GDAL >= 1.10.0) Do not copy metadata. Without this option, dataset and band metadata (as well as some band information) will be copied from the first source dataset. Items that differ between source datasets will be set to * (see -cvmd option).
.IP "\fB\fB-cvmd\fP \fImeta_conflict_value\fP:\fP" 1c
(GDAL >= 1.10.0) Value to set metadata items that conflict between source datasets (default is '*'). Use '' to remove conflicting items.
.IP "\fB\fB-setci\fP:\fP" 1c
(GDAL >= 1.10.0) Set the color interpretation of the bands of the target dataset from the source dataset.
.IP "\fB\fIsrcfile\fP:\fP" 1c
The source file name(s).
.IP "\fB\fIdstfile\fP:\fP" 1c
The destination file name.
Mosaicing into an existing output file is supported if the output file already exists. The spatial extent of the existing file will not be modified to accommodate new data, so you may have to remove it in that case, or use the -overwrite option.
Polygon cutlines may be used as a mask to restrict the area of the destination file that may be updated, including blending. If the OGR layer containing the cutline features has no explicit SRS, the cutline features must be in the georeferenced units of the destination file. When outputing to a not yet existing target dataset, its extent will be the one of the original raster unless -te or -crop_to_cutline are specified.
For instance, an eight bit spot scene stored in GeoTIFF with control points mapping the corners to lat/long could be warped to a UTM projection with a command like this:
gdalwarp -t_srs '+proj=utm +zone=11 +datum=WGS84' raw_spot.tif utm11.tif
For instance, the second channel of an ASTER image stored in HDF with control points mapping the corners to lat/long could be warped to a UTM projection with a command like this:
gdalwarp HDF4_SDS:ASTER_L1B:"pg-PR1B0000-2002031402_100_001":2 pg-PR1B0000-2002031402_100_001_2.tif
Frank Warmerdam <firstname.lastname@example.org>, Silke Reimer <email@example.com>