Histograms

URL:
https://<imageservice-url>/histograms
Methods:
GET
Required Capability:
Image
Version Introduced:
10.1

Description

The histograms resource returns histograms of the image. This resource is supported if the hasHistograms property of the service is true .

Request parameters

ParameterDetails

variable

This parameter is added at 10.8.1 and is available if the image service uses ArcObjects11 or ArcObjectsRasterRendering as the service provider.

For an image service that has multidimensional information, this parameter can be used to request histograms for each variable. It will return histograms for the whole image service if not specified. Eligible variable names can be queried from the Multidimensional Info image service resource.

renderingRule

Specifies the rendering rule for how the requested image should be rendered.

In the context of accessing image service histograms resource, this parameter is used to retrieve histograms info in attached predefined raster function templates (inside a StatisticsHistogram function).

f

The response format. The default response format is html .

Values: html | json

Example usage

Example: Return histograms of an image service.

https://sampleserver6.arcgisonline.com/arcgis/rest/services/CharlotteLAS/ImageServer/histograms

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "histograms": [
    <histogram1>,
    <histogram2>,
    <histogram3>,
    ...
  ]
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  "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
        ...
      ]
    }
  ]
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.