{
  "title": "Image Service Layer (ArcGISImageServiceLayer)",
  "type": "object",
  "$schema": "http://json-schema.org/draft-04/schema",
  "description": "An image service provides access to raster data through a web service. Multiple rasters can be served as one image service through mosaic dataset technology, dynamically processed and mosaicked on the fly. An image service supports accessing both the mosaicked image and its catalog, as well as individual rasters in the catalog. Also, image services can be cached (tiled) or uncached (dynamic). This object specifically details properties within uncached image services.",
  "properties": {
    "bandIds": {
      "type": "array",
      "description": "An array of bandIds that are visible, can specify bands to export or rearrange band order(from image service).",
      "items": {
        "type": "integer"
      }
    },
    "compressionQuality": {
      "type": "number",
      "description": "Controls how much loss the image will be subjected to by the compression algorithm (from image service).",
      "minimum": 0,
      "maximum": 100
    },
    "disablePopup": {
      "type": "boolean",
      "description": "Boolean property indicating whether to ignore popups defined by the service item.",
      "default": false
    },
    "format": {
      "type": "string",
      "description": "String value representing image format.",
      "enum": [
        "bmp",
        "gif",
        "jpg",
        "jpgpng",
        "png",
        "png24",
        "png32",
        "png8",
        "tiff"
      ],
      "default": "png"
    },
    "id": {
      "type": "string",
      "description": "A unique identifying string for the layer."
    },
    "interpolation": {
      "type": "string",
      "description": "The algorithm used for interpolation.",
      "enum": [
        "RSP_BilinearInterpolation",
        "RSP_CubicConvolution",
        "RSP_Majority",
        "RSP_NearestNeighbor"
      ]
    },
    "isReference": {
      "type": "boolean",
      "description": "This is applicable if used as a baseMapLayer. A boolean value indicating whether or not the baseMapLayer draws on top (true) of other layers, including operationalLayers , or below (false).",
      "default": false
    },
    "itemId": {
      "type": "string",
      "description": "Optional string containing the item ID of the service if it's registered on ArcGIS Online or your organization's portal."
    },
    "layerDefinition": {
      "allOf": [
        {
          "$ref": "layerDefinition_schema.json"
        },
        {
          "properties": {
            "definitionExpression": {},
            "drawingInfo": {}
          },
          "additionalProperties": false
        }
      ]
    },
    "layerType": {
      "type": "string",
      "description": "String indicating the layer type.",
      "enum": [
        "ArcGISImageServiceLayer"
      ]
    },
    "listMode": {
      "type": "string",
      "description": "To show or hide layers in the layer list",
      "enum": [
        "hide",
        "show"
      ],
      "default": "show"
    },
    "maxScale": {
      "type": "number",
      "description": "A number representing the maximum scale at which the layer will be visible. The number is the scale's denominator.",
      "minimum": 0
    },
    "minScale": {
      "type": "number",
      "description": "A number representing the minimum scale at which the layer will be visible. The number is the scale's denominator.",
      "minimum": 0
    },
    "mosaicRule": {
      "type": "object",
      "description": "Specifies the mosaic rule when defining how individual images should be mosaicked.",
      "$ref": "mosaicRule_schema.json"
    },
    "noData": {
      "type": "integer",
      "description": "The pixel value that represents no information."
    },
    "noDataInterpretation": {
      "type": "string",
      "description": "A string value of interpretation of noData setting. Default is `esriNoDataMatchAny` when noData is a number, and `esriNoDataMatchAll` when noData is an array.",
      "enum": [
        "esriNoDataMatchAll",
        "esriNoDataMatchAny"
      ],
      "default": "esriNoDataMatchAny"
    },
    "opacity": {
      "type": "number",
      "description": "The degree of transparency applied to the layer on the client side, where 0 is full transparency and 1 is no transparency.",
      "minimum": 0,
      "maximum": 1,
      "default": 1
    },
    "pixelType": {
      "type": "string",
      "description": "Pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point.",
      "enum": [
        "C128",
        "C64",
        "F32",
        "F64",
        "S16",
        "S32",
        "S8",
        "U1",
        "U16",
        "U2",
        "U32",
        "U4",
        "U8",
        "UNKNOWN"
      ]
    },
    "popupInfo": {
      "type": "object",
      "description": "A popupInfo object defining the content of popup windows when you click or query a feature.",
      "$ref": "popupInfo_schema.json"
    },
    "refreshInterval": {
      "type": "number",
      "description": "Refresh interval of the layer in minutes. Non-zero value indicates automatic layer refresh at the specified interval. Value of 0 indicates auto refresh is not enabled."
    },
    "renderingRule": {
      "type": "object",
      "description": "Specifies the rendering rule for how the requested image should be rendered.",
      "$ref": "renderingRule_schema.json"
    },
    "showLegend": {
      "type": "boolean",
      "description": "Indicates whether to allow map authors the ability to control what layers should be shown in a client's legend control.",
      "default": true
    },
    "title": {
      "type": "string",
      "description": "A user-friendly string title for the layer that can be used in a table of contents."
    },
    "url": {
      "type": "string",
      "description": "The URL to the layer.",
      "format": "uri"
    },
    "visibility": {
      "type": "boolean",
      "description": "Boolean property determining whether the layer is initially visible in the web map.",
      "default": true
    }
  },
  "required": [
    "layerType",
    "title",
    "url"
  ],
  "additionalProperties": false,
  "esriDocumentation": {
    "examples": [
      {
        "title": "Image Service with renderingRule",
        "code": {
          "operationalLayers": [
            {
              "id": "CharlotteLAS_88",
              "layerType": "ArcGISImageServiceLayer",
              "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/CharlotteLAS/ImageServer",
              "visibility": true,
              "format": "jpgpng",
              "compressionQuality": 95,
              "opacity": 1,
              "title": "CharlotteLAS",
              "renderingRule": {
                "rasterFunction": "Stretch",
                "rasterFunctionArguments": {
                  "StretchType": 5,
                  "DRA": false,
                  "Gamma": [
                    1
                  ],
                  "UseGamma": true
                },
                "outputPixelType": "U8"
              },
              "mosaicRule": {
                "mosaicMethod": "esriMosaicSeamline",
                "mosaicOperation": "MT_BLEND"
              }
            }
          ]
        }
      },
      {
        "title": "Image Service with renderer",
        "code": {
          "operationalLayers": [
            {
              "id": "f297e8f3d9ad4a12997b814d767d4b23",
              "title": "Elevation\\mn30_grd_m2_sml",
              "visibility": false,
              "opacity": 1,
              "url": "https://kukui.esri.com:6443/arcgis/rest/services/Elevation/mn30_grd_m2_sml/ImageServer",
              "layerType": "ArcGISImageServiceLayer",
              "compressionQuality": 75,
              "layerDefinition": {
                "drawingInfo": {
                  "renderer": {
                    "type": "rasterStretch",
                    "stretchType": "percentClip",
                    "dra": false,
                    "gamma": [
                      1
                    ],
                    "useGamma": false,
                    "minPercent": 0.5,
                    "maxPercent": 0.5,
                    "colorRamp": {
                      "type": "multipart",
                      "colorRamps": [
                        {
                          "type": "algorithmic",
                          "algorithm": "esriCIELabAlgorithm",
                          "fromColor": [
                            138,
                            29,
                            94,
                            255
                          ],
                          "toColor": [
                            145,
                            190,
                            253,
                            255
                          ]
                        },
                        {
                          "type": "algorithmic",
                          "algorithm": "esriHSVAlgorithm",
                          "fromColor": [
                            255,
                            255,
                            115,
                            255
                          ],
                          "toColor": [
                            230,
                            0,
                            0,
                            255
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "mosaicRule": {
                "mosaicMethod": "esriMosaicCenter",
                "ascending": true,
                "mosaicOperation": "MT_FIRST"
              },
              "interpolation": "RSP_BilinearInterpolation"
            }
          ]
        }
      }
    ]
  }
}
