Reproject
Summary
Creates a raster object by modifying the projection of the input raster.
Discussion
For more information about how this function works, see the Reproject raster function.
The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.
Syntax
Reproject(raster, {spatial_reference}, {x_cell_size}, {y_cell_size}, {x_registration_point}, {y_registration_point})
| Parameter | Explanation | Data Type |
|---|---|---|
|
raster |
The input raster. |
Raster |
|
spatial_reference |
The coordinate system used to reproject the data. This value is provided as a Python dictionary with the well-known ID ( For example, the WGS 1984 Web Mercator Auxiliary Sphere projection has a The default value is None. |
Dictionary |
|
x_cell_size |
The cell size in the x-dimension to use if resampling the data. If no value is provided or the value is 0, the output envelope (extent and cell sizes) is calculated from the input raster. The default value is 0. |
Integer |
|
y_cell_size |
The cell size in the y-dimension to use if resampling the data. If no value is provided or the value is 0, the output envelope (extent and cell sizes) is calculated from the input raster. The default value is 0. |
Integer |
|
x_registration_point |
The x-coordinate used to define the upper left corner of the dataset. The coordinate must be in the units of the new spatial reference. If both The default value is 0. |
Double |
|
y_registration_point |
The y-coordinate used to define the upper left corner of the dataset. The coordinate must be in the units of the new spatial reference. If both The default value is 0. |
Double |
Return value
| Data Type | Explanation |
|---|---|
|
Raster |
The reprojected raster object. |
Code sample
Reprojects a raster to the WGS 1984 UTM Zone 11N coordinate system.
# Import system modules
import arcpy
from arcpy.ia import *
input_raster = arcpy.Raster("LasVegas_LandCover.tif")
# reproject the input raster to WGS 1984 UTM Zone 11N
reprojected_raster = arcpy.ia.Reproject(input_raster, {"wkid" : 32611})
# verify the new coordinate system
prj = print(arcpy.Describe(reprojected_raster).spatialReference.name)
# save the output
reprojected_raster.save("C:/arcpyExamples/outputs/LasVegas_LandCover_UTM11N.tif")