Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Data Management toolbox > Projections and Transformations toolset > Raster Tools

Rotate (Data Management)

Release 9.2
Last modified November 29, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Raster Tools"


Related Topics

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

Rotate illustration

Usage tips

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.

  • NEAREST — Nearest neighbor assignment (the default)
  • BILINEAR — Bilinear interpolation
  • CUBIC — Cubic convolution

String
Data types for geoprocessing tool parameters


Command line example

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.

  • NEAREST — Nearest neighbor assignment (the default)
  • BILINEAR — Bilinear interpolation
  • CUBIC — Cubic convolution

String

Data types for geoprocessing tool parameters


Script example

# 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.
  • NEAREST - Nearest-neighbor assignment. This is the default.
  • BILINEAR - Bilinear interpolation.
  • CUBIC - Cubic convolution.

See "Resample" in Using Spatial Analyst for a description of the resampling methods.

Map Algebra example

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.

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.