ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Rotate

  • Summary
  • Illustration
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Turn a raster dataset around a pivot point.

Illustration

Rotate illustration

Usage

  • 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.

  • Specify a rotation angle between 0 and 360 to rotate the raster clockwise. To rotate the raster in the counterclockwise direction, specify the angle as a negative value.

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

  • When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase, you can specify a Compression Type type and Compression Quality within the Environment Settings.

Syntax

Rotate_management (in_raster, out_raster, angle, {pivot_point}, {resampling_type})
ParameterExplanationData Type
in_raster

Select the raster dataset to rotate.

Mosaic Layer; Raster Layer
out_raster

Specify a name, location, and format for the dataset you are creating. When storing a raster dataset in a geodatabase, do not add a file extension 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.

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
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • no extension for Esri Grid
Raster Dataset
angle

Specify a value between 0 and 360 degrees to rotate the raster by that amount in the clockwise direction. To rotate the raster in the counterclockwise direction, specify the angle as a negative value. The angle can be specified as an integer or a floating-point value.

Double
pivot_point
(Optional)

Select a point to rotate the raster around. If left blank, the lower left corner of the input raster dataset will serve as the pivot.

Point
resampling_type
(Optional)

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

  • NEAREST — The fastest resampling method; it minimizes changes to pixel values. Suitable for discrete data, such as land cover.
  • BILINEAR — Calculates the value of each pixel by averaging (weighted for distance) the values of the surrounding 4 pixels. Suitable for continuous data.
  • CUBIC — Calculates the value of each pixel by fitting a smooth curve based on the surrounding 16 pixels. Produces the smoothest image but can create values outside of the range found in the source data. Suitable for continuous data.
  • MAJORITY — Determines the value of each pixel based on the most popular value within a 3 by 3 window. 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 since it is the quickest and also because it will not change the cell values. Do not use either of these 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 either of these be used with categorical data because the cell values may be altered.

String

Code sample

Rotate example 1 (Python window)

This is a Python sample for the Rotate tool.

import arcpy
arcpy.Rotate_management("c:/data/image.tif", "c:/output/rotate.tif", "30",\
                        "1940000 304000", "BILINEAR")
Rotate example 2 (stand-alone window)

This is a Python script sample for the Rotate tool.

##====================================
##Rotate
##Usage: Rotate_management in_raster out_raster angle {pivot_point} {NEAREST | BILINEAR | CUBIC | MAJORITY}
    
import arcpy

arcpy.env.workspace = r"C:/Workspace"
pivot_point = "1942602 304176"

##Rescale a TIFF image by a factor of 4 in both directions
arcpy.Rotate_management("image.tif", "rotate.tif", "30", pivot_point, "BILINEAR")

Environments

  • Compression
  • Current Workspace
  • Extent
  • NoData
  • Output CONFIG Keyword
  • Output Coordinate System
  • Pyramid
  • Raster Statistics
  • Scratch Workspace
  • Snap Raster
  • Tile Size

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Projections and Transformations toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal