.TH "gdalwarp" 1 "Sun Apr 9 2017" "GDAL" \" -*- nroff -*- .ad l .nh .SH NAME gdalwarpgdalwarp \- image reprojection and warping utility .SH "SYNOPSIS" .PP .PP .PP .nf 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] [-te_srs srs_def] [-tr xres yres] [-tap] [-ts width height] [-ovr level|AUTO|AUTO-n|NONE] [-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] [-oo NAME=VALUE]* [-doo NAME=VALUE]* srcfile* dstfile .fi .PP .SH "DESCRIPTION" .PP 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\&. .PP .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 (i\&.e\&. EPSG:4296), PROJ\&.4 declarations (as above), or the name of a \&.prj 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 (i\&.e\&. EPSG:4296), PROJ\&.4 declarations (as above), or the name of a \&.prj 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, unless, starting with GDAL 2\&.1, the RPC_DEM warping option is specified, in which case, an exact transformer, i\&.e\&. err_threshold=0, will be used)\&. .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 by default, or in the SRS specified with -te_srs) .IP "\fB\fB-te_srs\fP \fIsrs_def\fP:\fP" 1c (GDAL >= 2\&.0) Specifies the SRS in which to interpret the coordinates given with -te\&. The \fIsrs_def\fP may be any of the usual GDAL/OGR forms, complete WKT, PROJ\&.4, EPSG:n or a file containing the WKT\&. This must not be confused with -t_srs which is the target SRS of the output dataset\&. -te_srs is a convenience e\&.g\&. when knowing the output coordinates in a geodetic long/lat SRS, but still wanting a result in a projected coordinate system\&. .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-ovr\fP \fIlevel|AUTO|AUTO-n|NONE>\fP:\fP" 1c (GDAL >= 2\&.0) To specify which overview level of source files must be used\&. The default choice, AUTO, will select the overview level whose resolution is the closest to the target resolution\&. Specify an integer value (0-based, i\&.e\&. 0=1st overview level) to select a particular level\&. Specify AUTO-n where n is an integer greater or equal to 1, to select an overview level below the AUTO one\&. Or specify NONE to force the base resolution to be used (can be useful if overviews have been generated with a low quality resampling method, and the warping is done using a higher quality resampling method)\&. .IP "\fB\fB-wo\fP \fI'NAME=VALUE'\fP:\fP" 1c Set a warp option\&. 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 bilinear resampling\&. .IP "\fB\fBcubic\fP: \fP" 1c cubic resampling\&. .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\fBmax\fP: \fP" 1c maximum resampling, selects the maximum value from all non-NODATA contributing pixels\&. (GDAL >= 2\&.0\&.0) .IP "\fB\fBmin\fP: \fP" 1c minimum resampling, selects the minimum value from all non-NODATA contributing pixels\&. (GDAL >= 2\&.0\&.0) .IP "\fB\fBmed\fP: \fP" 1c median resampling, selects the median value of all non-NODATA contributing pixels\&. (GDAL >= 2\&.0\&.0) .IP "\fB\fBq1\fP: \fP" 1c first quartile resampling, selects the first quartile value of all non-NODATA contributing pixels\&. (GDAL >= 2\&.0\&.0) .IP "\fB\fBq3\fP: \fP" 1c third quartile resampling, selects the third quartile value of all non-NODATA contributing pixels\&. (GDAL >= 2\&.0\&.0) .PP .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\&. Use a value of \fCNone\fP to ensure that nodata is not defined (GDAL>=1\&.11)\&. If this argument is not used then nodata values will be copied from the source dataset (GDAL>=1\&.11)\&. .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 Be quiet\&. .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\&. .PP .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\fB-oo\fP \fINAME=VALUE\fP:\fP" 1c (starting with GDAL 2\&.0) Dataset open option (format specific) .IP "\fB\fB-doo\fP \fINAME=VALUE\fP:\fP" 1c (starting with GDAL 2\&.1) Output dataset open option (format specific) .PP .IP "\fB\fIsrcfile\fP:\fP" 1c The source file name(s)\&. .IP "\fB\fIdstfile\fP:\fP" 1c The destination file name\&. .PP .PP 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\&. .PP 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 SRS of the destination file\&. When writing 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\&. .SH "EXAMPLE" .PP 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: .PP .PP .nf gdalwarp -t_srs '+proj=utm +zone=11 +datum=WGS84' raw_spot.tif utm11.tif .fi .PP .PP 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: .PP .PP .nf gdalwarp HDF4_SDS:ASTER_L1B:"pg-PR1B0000-2002031402_100_001":2 pg-PR1B0000-2002031402_100_001_2.tif .fi .PP .SH "SEE ALSO" .PP http://trac.osgeo.org/gdal/wiki/UserDocs/GdalWarp : Wiki page discussing options and behaviours of gdalwarp .SH "AUTHORS" .PP Frank Warmerdam warmerdam@pobox.com, Silke Reimer silke@intevation.de