Project Raster (Data Management)

Summary

Transforms a raster dataset from one coordinate system to another.

Learn more about how Project Raster works

Usage

  • The coordinate system defines how your raster data is projected. You can use the same coordinate system for your data so it will all be in the same projection.

  • A raster dataset is projected into a new spatial reference using a bilinear interpolation approximation method that projects pixels on a coarse mesh grid and uses bilinear interpolation between the pixels.

  • This tool guarantees that the error range is less than half a pixel.

  • To apply the transformation without creating a file, use the Warp tool.

  • You can choose a preexisting spatial reference, import it from another dataset, or create one.

  • This tool can only output a square pixel size.

  • You can save the output to BIL, BIP, BMP, BSQ, DAT, Esri Grid, GIF, IMG, JPEG, JPEG 2000, PNG, TIFF, MRF, or CRF format, or any geodatabase raster dataset.

  • When storing a raster dataset to a JPEG format file, a JPEG 2000 format file, or a geodatabase, you can specify a Compression Type value and a Compression Quality value in the geoprocessing environments.

  • The Nearest option, which performs a nearest neighbor assignment, is the fastest of the four interpolation techniques. It is primarily used for categorical data, such as a land-use classification, because it will not change the pixel values. It should not be used for continuous data, such as elevation surfaces.

  • The Bilinear option uses bilinear interpolation to determine the new value of a pixel based on a weighted distance average of the four nearest surrounding pixels. The Cubic option uses cubic convolution to determine the new pixel value by fitting a smooth curve through the surrounding points. These are the most appropriate choices for continuous data but may cause some smoothing. Cubic convolution may result in the output raster containing values outside the range of the input raster. Don't use either of these options with categorical data because different pixel values may be introduced, which may be undesirable.

  • The cells of the raster dataset will be square and of equal area in map coordinate space, although the shape and area a cell represents on the surface of the earth will never be constant across a raster. This is because no map projection can preserve both shape and area simultaneously. The area represented by the cells will vary across the raster. Therefore, the cell size and the number of rows and columns in the output raster may change.

  • Always specify an output cell size, unless you are projecting between spherical (latitude–longitude) coordinates and a planar coordinate system and don't know the appropriate cell size.

  • The default cell size of the output raster is determined from the projected cell size at the center of the output raster. This is typically the intersection of the central meridian and latitude of true scale and is the area of least distortion. The boundary of the input raster is projected, and the minimum and maximum extents dictate the size of the output raster. Each cell is projected back to the input coordinate system to determine the cell's value.

  • The geographic transformation is an optional parameter when the input and output coordinate systems have the same datum. If the input and output datum are different, a geographic transformation must be specified.

  • The registration point allows you to specify the origin point for anchoring the output cells. All output cells will be an interval of the cell size away from this point. This point does not have to be a corner coordinate or fall within the raster dataset. If a snap raster is set in the Environment settings, the registration point will be ignored.

  • CLARKE 1866 is the default spheroid if it is not inherent to the projection (such as NEWZEALAND_GRID) or another is specified with the SPHEROID subcommand.

  • The snap raster setting will take priority over the registration point if both are set.

  • To perform a vertical transformation, check the optional Vertical parameter on the dialog box. By default, the Vertical parameter is unavailable and is only available when the input and output coordinate systems have a vertical coordinate system (VCS), and the input feature class coordinates have z-values. Also, additional data (coordinate systems data) setup must be installed on the system.

    When you select the output coordinate system, you can choose both the geographic or projected coordinate system and a VCS. If the input and output VCS are different, an appropriate vertical and an optional geographic (datum) transformations is available. If a transformation should be applied in the opposite direction to its definition, choose the entry with the tilde (~) in front of the name.

Parameters

LabelExplanationData Type
Input Raster

The raster dataset that will be transformed into a new projection.

Mosaic Layer; Raster Layer
Output Raster Dataset

The raster dataset with the new projection that will be created.

When storing the raster dataset in a file format, specify the file extension as follows:

  • .bilEsri BIL
  • .bipEsri BIP
  • .bmp—BMP
  • .bsqEsri BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • .mrf—MRF
  • .crf—CRF
  • No extension for Esri Grid

When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset.

When storing a raster dataset to a JPEG format file, a JPEG 2000 format file, a TIFF format file, or a geodatabase, you can specify Compression Type and Compression Quality values in the geoprocessing environments.

Raster Dataset
Output Coordinate System

The coordinate system of the new raster dataset.

Coordinate System
Resampling Technique
(Optional)

Specifies the resampling technique that will be used. The default is Nearest.

The Nearest and Majority options are used for categorical data, such as a land-use classification. The Nearest option is the default. It is the quickest and does not change the pixel values. Do not use either of these options for continuous data, such as elevation surfaces.

The Bilinear and Cubic options are most appropriate for continuous data. It is recommended that you do not use either of these options with categorical data because the pixel values may be altered.

  • Nearest neighbor The nearest neighbor technique will be used. It minimizes changes to pixel values since no new values are created and is the fastest resampling technique. It is suitable for discrete data, such as land cover.
  • Bilinear interpolation The bilinear interpolation technique will be used. It calculates the value of each pixel by averaging (weighted for distance) the values of the surrounding four pixels. It is suitable for continuous data.
  • Cubic convolutionThe cubic convolution technique will be used. It calculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. This produces the smoothest image but can create values outside of the range found in the source data. It is suitable for continuous data.
  • Majority resamplingThe majority resampling technique will be used. It determines the value of each pixel based on the most popular value in a 4 by 4 window. It is suitable for discrete data.
String
Output Cell Size
(Optional)

The cell size of the new raster using an existing raster dataset or by specifying its width (x) and height (y).

Cell Size XY
Geographic Transformation
(Optional)

The geographic transformation when projecting from one geographic system or datum to another. A transformation is required when the input and output coordinate systems have different datums.

String
Registration Point
(Optional)

The lower left point for anchoring the output cells. This point does not have to be a corner coordinate or fall within the raster dataset.

The Snap Raster Environment setting will take priority over the Registration Point parameter. To set the registration point, make sure Snap Raster is not set.

Point
Input Coordinate System
(Optional)

The coordinate system of the input raster dataset.

Coordinate System
Vertical
(Optional)

Specifies whether a vertical transformation will be applied.

This option is active when the input and output coordinate systems have a vertical coordinate system and the input raster's coordinates have z-values.

When Vertical is checked, the Geographic Transformation parameter can include ellipsoidal transformations and transformations between vertical datums. For example, ~NAD_1983_To_NAVD88_CONUS_GEOID12B_Height + NAD_1983_To_WGS_1984_1 transforms geometry vertices that are defined on NAD 1983 datum with NAVD 1988 heights into vertices on the WGS 1984 ellipsoid (with z-values representing ellipsoidal heights). The tilde (~) indicates reversed direction of transformation.

  • Unchecked—No vertical transformation is applied. The z-values of geometry coordinates will be ignored and the z-values will not be modified. This is the default.
  • Checked—The transformation specified in the Geographic Transformation parameter is applied. The Project Raster tool transforms x-, y-, and z-values of geometry coordinates.

Many vertical transformations require additional data files that must be installed using the ArcGIS Coordinate Systems Data installation package.

Boolean

arcpy.management.ProjectRaster(in_raster, out_raster, out_coor_system, {resampling_type}, {cell_size}, {geographic_transform}, {Registration_Point}, {in_coor_system}, {vertical})
NameExplanationData Type
in_raster

The raster dataset that will be transformed into a new projection.

Mosaic Layer; Raster Layer
out_raster

The raster dataset with the new projection that will be created.

When storing the raster dataset in a file format, specify the file extension as follows:

  • .bilEsri BIL
  • .bipEsri BIP
  • .bmp—BMP
  • .bsqEsri BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • .mrf—MRF
  • .crf—CRF
  • No extension for Esri Grid

When storing a raster dataset in a geodatabase, do not add a file extension to the name of the raster dataset.

When storing a raster dataset to a JPEG format file, a JPEG 2000 format file, a TIFF format file, or a geodatabase, you can specify Compression Type and Compression Quality values in the geoprocessing environments.

Raster Dataset
out_coor_system

The coordinate system of the new raster dataset.

Valid values for this parameter are the following:

  • An existing feature class, feature dataset, raster dataset (basically anything with a coordinate system)
  • An ArcPy SpatialReference object

Coordinate System
resampling_type
(Optional)

Specifies the resampling technique that will be used. The default is Nearest.

  • NEAREST The nearest neighbor technique will be used. It minimizes changes to pixel values since no new values are created and is the fastest resampling technique. It is suitable for discrete data, such as land cover.
  • BILINEAR The bilinear interpolation technique will be used. It calculates the value of each pixel by averaging (weighted for distance) the values of the surrounding four pixels. It is suitable for continuous data.
  • CUBICThe cubic convolution technique will be used. It calculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. This produces the smoothest image but can create values outside of the range found in the source data. It is suitable for continuous data.
  • MAJORITYThe majority resampling technique will be used. It determines the value of each pixel based on the most popular value in a 4 by 4 window. It is suitable for discrete data.

The Nearest and Majority options are used for categorical data, such as a land-use classification. The Nearest option is the default. It is the quickest and does not change the pixel values. Do not use either of these options for continuous data, such as elevation surfaces.

The Bilinear and Cubic options are most appropriate for continuous data. It is recommended that you do not use either of these options with categorical data because the pixel values may be altered.

String
cell_size
(Optional)

The cell size of the new raster using an existing raster dataset or by specifying its width (x) and height (y).

Cell Size XY
geographic_transform
[geographic_transform,...]
(Optional)

The geographic transformation when projecting from one geographic system or datum to another. A transformation is required when the input and output coordinate systems have different datums.

String
Registration_Point
(Optional)

The lower left point for anchoring the output cells. This point does not have to be a corner coordinate or fall within the raster dataset.

The Snap Raster Environment setting will take priority over the Registration Point parameter. To set the registration point, make sure Snap Raster is not set.

Point
in_coor_system
(Optional)

The coordinate system of the input raster dataset.

Coordinate System
vertical
(Optional)

Specifies whether a vertical transformation will be performed.

This parameter is only enabled when the input and output coordinate systems have a vertical coordinate system and the input feature class coordinates have z-values.

When the VERTICAL keyword is used, the geographic_transform parameter can include ellipsoidal transformations and transformations between vertical datums. For example, “~NAD_1983_To_NAVD88_CONUS_GEOID12B_Height + NAD_1983_To_WGS_1984_1” transforms geometry vertices that are defined on NAD 1983 datum with NAVD 1988 heights into vertices on the WGS 1984 ellipsoid (with z-values representing ellipsoidal heights). The tilde (~) indicates reversed direction of transformation.

  • NO_VERTICALNo vertical transformation is applied. The z-values of geometry coordinates will be ignored and the z-values will not be modified. This is the default.
  • VERTICALThe transformation specified in the geographic_transform parameter is applied. The Project Raster tool transforms x-, y-, and z-values of geometry coordinates.

Many vertical transformations require additional data files that must be installed using the ArcGIS Coordinate Systems Data installation package.

Boolean

Code sample

ProjectRaster example 1 (Python window)

This is a Python sample for the ProjectRaster tool.

import arcpy
from arcpy import env
arcpy.ProjectRaster_management("c:/data/image.tif", "c:/output/reproject.tif",\
                               "World_Mercator.prj", "BILINEAR", "5",\
                               "NAD_1983_To_WGS_1984_5", "#", "#")
ProjectRaster example 2 (stand-alone script)

This is a Python script sample for the ProjectRaster tool.

##====================================
##Project Raster
##Usage: ProjectRaster_management in_raster out_raster out_coor_system {NEAREST | BILINEAR 
##                                | CUBIC | MAJORITY} {cell_size} {geographic_transform;
##                                geographic_transform...} {Registration_Point} {in_coor_system}
    
import arcpy

arcpy.env.workspace = r"C:/Workspace"

##Reproject a TIFF image with Datumn transfer
arcpy.ProjectRaster_management("image.tif", "reproject.tif", "World_Mercator.prj",\
                               "BILINEAR", "5", "NAD_1983_To_WGS_1984_5", "#", "#")

##Reproject a TIFF image that does not have a spatial reference
##Set snapping point to the top left of the original image
snapping_pnt = "1942602 304176"

arcpy.ProjectRaster_management("nosr.tif", "project.tif", "World_Mercator.prj", "BILINEAR",\
                               "5", "NAD_1983_To_WGS_1984_6", snapping_pnt,\
                               "NAD_1983_StatePlane_Washington_North.prj")

Related topics