Rotate (Data Management) |
|
Release 9.2
Last modified November 29, 2010 |
![]() ![]() ![]() Print all topics in : "Raster Tools" |
Turns the raster dataset around the specified pivot point by angle specified in degrees; the raster dataset will rotate in a clock-wise rotation.
Valid values for the rotation angle is any number from zero to 360; including floating point values. A negative value will rotate the image in a counter-clockwise rotation.
Illustration
Usage tips
Command line and Scripting
Use rotate when the raster dataset is in the wrong orientation. The default pivot point is in the lower left corner of the raster dataset; however, a different location can be specified.
You can save your output to GRID, IMG, TIFF, personal geodatabase, file geodatabase, or ArcSDE geodatabase.
When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. When storing the raster dataset in a file format, you need to specify the file extension: .img for an ERDAS IMAGINE file, .tif for TIFF, or no extension for GRID.
When storing your raster dataset to a geodatabase, you can specify a compression type and compression quality within the Raster Storage Settings in the Environment Settings dialog box.
Rotation is, by default, around the lower left corner of the raster. The rotation point can be changed with the optional Pivot Point parameter.
Resampling is only done if the angle is not a multiple of 90.
The rotation angle specified must be between 0 and 360, the dataset will be rotated in a clock-wise rotation.
When you are using the tool's command in the command line window, you may need to press F8 when entering a variable with which you need help. You may want to do this when entering a pivot point.
The following environments affect this tool: current workspace, scratch workspace, output coordinate system, output extent, output CONFIG keyword, pyramid, raster statistics, compression, and tile size.
Map Algebra
The rotation is around the lower left corner of the raster.
The resampling is only applied if the angle is not a multiple of 90.
The normal range of values for angle is 0 to 360. If values outside this range are entered, they will be normalized to it. For example, if the specified angle is 370° , the result would be equivalent to specifying the angle as 10° (370° - 360° = 10° ).
Learn more about how to specify the input raster dataset in the Map Algebra expression of Raster Calculator.
Command line syntax
An overview of the Command Line window
Rotate_management <in_raster> <out_raster> <angle> {pivot_point} {NEAREST | BILINEAR | CUBIC}
Parameter | Explanation | Data Type |
<in_raster> |
The input raster dataset. |
Composite Geodataset |
<out_raster> |
Output raster dataset. When storing the raster dataset in a file format, you need to specify the file extension: .img for an ERDAS IMAGINE file, .tif for TIFF, or no extension for GRID. When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality. |
Raster Dataset |
<angle> |
The angle in degrees to rotate the raster. This can be any floating-point number. |
Double |
{pivot_point} |
The pivot point around which to rotate the raster. The default is the lower left corner of the input raster dataset. To add this variable, press F8 or right-click and click Insert Variable. |
Point |
{NEAREST | BILINEAR | CUBIC} |
The resampling algorithm to be used.
|
String |
rotate_management d:\images\MyImages.mdb\flowers d:\images\NewImages.mdb\flowers 45 pivot_point1 CUBIC
Scripting syntax
About getting started with writing geoprocessing scripts
Rotate_management (in_raster, out_raster, angle, pivot_point, resampling_type)
Parameter | Explanation | Data Type |
in_raster (Required) |
The input raster dataset. |
Composite Geodataset |
out_raster (Required) |
Output raster dataset. When storing the raster dataset in a file format, you need to specify the file extension: .img for an ERDAS IMAGINE file, .tif for TIFF, or no extension for GRID. When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. A raster dataset stored in a geodatabase can be compressed; you can specify a compression type and compression quality. |
Raster Dataset |
angle (Required) |
The angle in degrees to rotate the raster. This can be any floating-point number. |
Double |
pivot_point (Optional) |
The pivot point around which to rotate the raster. The default is the lower left corner of the input raster dataset. To add this variable, press F8 or right-click and click Insert Variable. |
Point |
resampling_type (Optional) |
The resampling algorithm to be used.
|
String |
# RasterTransformation_rotate.py # Description: Rotates a raster around the specified pivot point by # an angle specified in degrees. # Requirements: None # Author: ESRI # Date: 12/22/03 # Create the Geoprocessor object import arcgisscripting gp = arcgisscripting.create() try: # Set the input raster dataset name inputRaster = "C:/data/ingrid" # Set the output raster name outputRaster = "C:/data/outgrid" # Specify the pivot point PivotPoint = "100 100" # Process: Rotate, specify the pivot point or use default # gp.Rotate_management(inputRaster, outputRaster, "45") gp.Rotate_management(inputRaster, outputRaster, "45" ,PivotPoint, "BILINEAR") except: # If an error occurred while running a tool, then print the messages print gp.GetMessages()
Map Algebra syntax
Rotate(<in_grid>, <angle>, {NEAREST | BILINEAR | CUBIC})
Parameter | Explanation |
<in_grid> | The name of the raster to be rotated. |
<angle> | The angle of rotation.
This can be any floating-point number. |
{NEAREST | BILINEAR | CUBIC} | The resampling algorithm to be used when rotating a raster.
See "Resample" in Using Spatial Analyst for a description of the resampling methods. |
rotate(ingrid) rotate(ingrid, 45) rotate(ingrid, 101.25, cubic)
ArcObjects syntax
There is no corresponding ArcGIS Spatial Analyst object to perform Rotate. However, in core ArcGIS, similar functionality can be found in the IRasterGeometryProc object.
For more information, see ArcObjects Developer Help.