Skip To Content
ArcGIS Developers

Compute Angles

  • URL:https://<imageservice-url>/computeAngles
  • Required Capability:Image, Catalog
  • Version Introduced:10.9.1


The computeAngles operation is performed on an image service resource. This operation computes the rotation angle of a raster for a user-specified angle direction, and optionally, a user-specified rotation point and user-specified spatial reference. The available angle directions are as follows:

  • North—The computed angle after rotating the map so the top of the image is always oriented toward north
  • Up—The computed angle after rotating the map so the top of the image is always oriented to the direction of the sensor when it acquired the image

For more information about changing the orientation of a raster, see Changing the orientation of a raster.

You can provide arguments to the computeAngles operation as query parameters. The parameter details are provided in the request parameters table below.

This operation is supported at 10.9.1 and later.


This operation requires an ArcGIS Image Server license.

Request parameters



Specifies the objectId of the image service’s raster catalog. The rasterId value identifies which raster to use in a mosaic dataset and which raster’s image coordinate system will be used as part of the calculation.



A point geometry that defines the reference point of rotation to compute the angle direction. The structure of the geometry is the same as the structure of the JSON geometry objects.

Default: Use the centroid of the image as the point of rotation.

By default, the point geometry is assumed to be in the spatial reference of the image service. You can specify a different spatial reference using the JSON structure syntax for geometries.






A string that specifies the name or names of the rotation angle to be computed. Options are “up” or “north”. You can specify multiple angle names by separating the names with a comma.

Default: Compute the angles for all directions.




angleName= north,up


A JSON object that specifies the spatial reference to be used by the image.

Default: Use the spatial reference of the image.


//Image coordinate space (ICS)

//Geographic (map) coordinate space (GCS)

The response format. The default response format is html.

Values: html | json

Example usage

The following are sample URL requests that demonstrate how to specify query parameters:

Example: Specify usage of all default parameters.

Example: Specify a custom (not center of image) rotation point."x":-71.6,"y":-32.875,"spatialReference":%7B"wkid":4326%7D%7D&f=pjson

Example: Specify the “up” angle direction.

Example: Specify the ICS spatial reference."icsid":1%7D&f=pjson

Example: Specify the GCS spatial reference with a custom point.<ImageServiceName>/ImageServer/computeAngles?rasterId=22&point=%7B%22x%22%3A71.350452%2C%22y%22%3A35.031646%7D&spatialReference=%7B%22wkid%22%3A4326%7D&angleName=&f=html

Example: Specify the ICS spatial reference with a custom point.<ImageServiceName>/ImageServer/computeAngles?rasterId=22&point=%7B%22x%22%3A17911%2C%22y%22%3A-6046%7D&spatialReference=%7B%22icsid%22%3A22%7D&angleName=&f=html

JSON Response syntax

  "north": <computed north angle>,
  "up": <computed up angle>,
  "spatialReference": {
    <serialized attributes of spatial reference>

JSON Response example

  "north": 0,
  "up": 64.977751,
  "spatialReference": {
    "wkid": 4326,
    "latestWkid": 4326,
    "vcsWkid": 115700,
    "latestVcsWkid": 115700