- URL:
- https://<imageservice-url>/computeAngles
- Methods:
GET
- Required Capability:
- Image, Catalog
- Version Introduced:
- 10.9.1
Description
The compute
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 compute
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.
Request parameters
Parameter | Description |
---|---|
(Required) | Specifies the |
(Optional) | 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. Examples
|
(Optional) | A string that specifies the name or names of the rotation angle to be computed. Options are Default: Compute the angles for all directions. Examples
|
(Optional) | A JSON object that specifies the spatial reference to be used by the image. Default: Use the spatial reference of the image. Examples
|
|
The response format. The default response format is Values: |
Example usage
The following are sample URL requests that demonstrate how to specify query parameters:
Example: Specify usage of all default parameters.
https://machine.domain.com/webadaptor/rest/services/My.Mosaics/ImageServer/computeAngles?rasterId=1&f=pjson
Example: Specify a custom (not center of image) rotation point.
https://machine.domain.com/webadaptor/rest/services/My.Mosaics/ImageServer/computeAngles?rasterId=1&point=%7B"x":-71.6,"y":-32.875,"spatialReference":%7B"wkid":4326%7D%7D&f=pjson
Example: Specify the “up”
angle direction.
https://machine.domain.com/webadaptor/rest/services/My.Mosaics/ImageServer/computeAngles?rasterId=1&angleName=up&f=pjson
Example: Specify the ICS spatial reference.
https://machine.domain.com/webadaptor/rest/services/My.Mosaics/ImageServer/computeAngles?rasterId=1&spatialReference=%7B"icsid":1%7D&f=pjson
Example: Specify the GCS spatial reference with a custom point.
https://machine.domain.com/webadaptor/rest/services/<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.
https://machine.domain.com/webadaptor/rest/services/<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
}
}