- URL:
- https://<imageservice-url>/computeHistograms
- Methods:
GET
- Required Capability:
- Image
- Version Introduced:
- 10.1
Description
This operation is supported at 10.1 and later.
The compute
operation is performed on an image service resource.
This operation is supported by an image service published with mosaic datasets or a raster dataset.
The result of this operation is an array of histograms for all raster bands computed from the given extent.
Support for the time
parameter is added at 10.8. The time
parameter can be used on an image service resource that uses ArcObjects11 or ArcObjectsRasterRendering as the service provider.
Support for the process
parameter is added at 10.9. The process
parameter can be used on an image service resource that uses ArcObjects11 or ArcObjectsRasterRendering as the service provider.
You can provide arguments to the compute
operation as query parameters defined in the parameters table below.
Request parameters
Parameter | Description |
---|---|
(Required) | Defines the geometry in which the histogram is computed. The geometry can be an envelope or a polygon. The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. JSON structures: Syntax: Example: |
(Required) | The type of geometry specified by the Values: |
| Specifies the mosaic rule when defining how individual images will be mosaicked. When a mosaic rule is not specified, the default mosaic rule of the image service will be used (as specified in the root resource: See the mosaic rule JSON objects for the syntax and examples. |
| Specifies the rendering rule for how the requested image will be rendered. See the raster function JSON objects for the syntax and examples. |
| The pixel level being used (or the resolution being looked at). If pixel size is not specified, The structure of the Syntax:
Examples:
|
| The time instant or the time extent to compute the histogram. Time is designated in UNIX Epoch time, or POSIX time, in milliseconds. Time instant:
Time extent (for time extents, one of
|
| Specifies whether to process the image service as a multidimensional image service. When set to Values: Example: |
|
The response format. The default response format is Values: |
Example usage
Example: Compute histograms of a mosaic dataset image service using a polygon geometry, and specify the mosaic rule using the esri
method.
https:
JSON Response syntax
"histograms" : [
<histogram1>, <histogram2>
]
JSON Response example
{
"histograms": [
{
"size" : 256,
"min" : -0.5,
"max" : 255.5,
"counts" : [
42915,
23218,
24832,
25925
36054,
57097,
61278,
65211
...
]
},
{
"size" : 256,
"min" : -0.5,
"max" : 255.5,
"counts" : [
42915,
23218,
24832,
25925
36054,
57097,
61278,
65211
...
]
},
{
"size" : 256,
"min" : -0.5,
"max" : 255.5,
"counts" : [
42915,
23218,
24832,
25925
36054,
57097,
61278,
65211
...
]
}
}