- URL:
- https://<imageservice-url>/computeStatisticsHistograms
- Methods:
GET
- Required Capability:
- Image
- Version Introduced:
- 10.4
Description
This operation is supported at 10.4 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 contains both statistics and histograms 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 should 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 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 statistics and histograms. 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 Syntax: Example: |
|
The response format. The default response format is Values: |
Example usage
Example: Compute statistics and histograms of a mosaic dataset image service using a polygon geometry, and specify the mosaic rule using the esri
method.
https:
JSON Response syntax
{
"statistics": [<statistics1>, <statistics2>],
"histograms": [<histogram1>, <histogram2>]
}
JSON Response example
{
"statistics": [
{
"min": 10,
"max": 250,
"mean": 45.623781249999745,
"standardDeviation": 63.183071536848246,
"median": 17,
"mode": 13,
"skipX": 1,
"skipY": 1,
"count": 160000,
"sum": 7299804.999999959
},
{
"min": 10,
"max": 250,
"mean": 76.2679624999998,
"standardDeviation": 78.07187772310637,
"median": 20,
"mode": 16,
"skipX": 1,
"skipY": 1,
"count": 160000,
"sum": 1.2202873999999968E7
},
{
"min": 10,
"max": 250,
"mean": 45.623706249999785,
"standardDeviation": 63.16672024871653,
"median": 17,
"mode": 13,
"skipX": 1,
"skipY": 1,
"count": 160000,
"sum": 7299792.999999966
}
],
"histograms": [
{
"size": 251,
"min": -0.5,
"max": 250.5,
"counts": [
……
906,
861,
915,
899,
……
]
},
{
"size": 251,
"min": -0.5,
"max": 250.5,
"counts": [
……
1801,
1776,
1779,
1814,
……
]
},
{
"size": 251,
"min": -0.5,
"max": 250.5,
"counts": [
……
902,
931,
912,
877,
……
]
}
]
}