Warp (Data Management)


Performs a transformation on the raster based on the source and target control points using a polynomial transformation. This is similar to georeferencing using a text file.

Learn more about how Warp works


Polynomial transformations



Warp_management (in_raster, source_control_points, target_control_points, out_raster, {transformation_type}, {resampling_type})
ParameterExplanationData Type

The input raster dataset.

Raster Layer

The source points are the "from" coordinates of the links.


The target points are the "to" coordinates of the links.


Output raster dataset.

When storing the raster dataset in a file format, you need to specify the file extension:

  • .bil—ESRI BIL
  • .bip—ESRI BIP
  • .bmp—BMP
  • .bsq—ESRI BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE file
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • no extension—ESRI GRID

When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset.

When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality.

Raster Dataset

The geometric transformation type.

  • POLYORDER1A first order polynomial (affine) fits a flat plane to the input points. This is the default.
  • POLYORDER2A second order polynomial fits a somewhat more complicated surface to the input points.
  • POLYORDER3A third order polynomial fits a more complicated surface to the input points.
  • ADJUSTA transformation that optimizes for both global and local accuracy. It accomplishes this by first performing a polynomial transformation, then adjusting the control points locally, to better match the target control points, using a triangulated irregular network (TIN) interpolation technique.
  • SPLINEA transformation that exactly transforms the source control points to the target control points. This means that the control points will be accurate, but the raster pixels that are between the control points are not.

The resampling algorithm to be used. The default is NEAREST.

  • NEARESTNearest neighbor assignment
  • BILINEARBilinear interpolation
  • CUBICCubic convolution
  • MAJORITYMajority resampling

The NEAREST and MAJORITY options are used for categorical data, such as a land use classification. The NEAREST option is the default since it is the quickest and also because it will not change the cell values. Do not use NEAREST or MAJORITY for continuous data, such as elevation surfaces.

The BILINEAR option and the CUBIC option are most appropriate for continuous data. It is not recommended that BILINEAR or CUBIC be used with categorical data because the cell values may be altered.


Code Sample

Warp example 1 (Python window)

This is a Python sample for the Warp tool.

import arcpy
from arcpy import env
env.workspace = "c:/data"
source_pnt = "'234718 3804287';'241037 3804297';'244193 3801275'"
target_pnt = "'246207 3820084';'270620 3824967';'302634 3816147'"
arcpy.Warp_management("raster.img", source_pnt, target_pnt, "warp.tif", "POLYORDER1",\
Warp example 2 (stand-alone script)

This is a Python script sample for the Warp tool.

##Usage: Warp_management in_raster source_control_points;source_control_points... 
##                       target_control_points;target_control_points... out_raster
##                       {POLYORDER_ZERO | POLYORDER1 | POLYORDER2 | POLYORDER3 | 
##                       ADJUST | SPLINE | PROJECTIVE} {NEAREST | BILINEAR | 
##                       CUBIC | MAJORITY}
    import arcpy
    arcpy.env.workspace = r"C:/Workspace"
    ##Warp a TIFF raster dataset with control points
    ##Define source control points
    source_pnt = "'234718 3804287';'241037 3804297';'244193 3801275'"
    ##Define target control points
    target_pnt = outpnts = "'246207 3820084';'270620 3824967';'302634 3816147'"
    arcpy.Warp_management("raster.img", source_pnt, target_pnt, "warp.tif", "POLYORDER2",\
    print "Warp example failed."
    print arcpy.GetMessages()


Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes