FRAMES | NO FRAMES Description | Parameters | Examples | Response
Raster Attribute Table
URL http://<imageservice-url>/rasterAttributeTable
Parent Resource Image Service
Required Capability Image

Description

This resource is supported from 10.1 onwards.

The raster attribute table resource returns categorical mapping of pixel values (e.g. a class, group, category, or membership). This resource is supported if hasRasterAttributeTable property of the service is true.

Resource Hierarchy

Raster Attribute Table

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json

Example Usage

Example 1: Return attribute table for a land cover image service.

http://myserver.arcgisonline.com:port/arcgis/rest/services/LandCover/ImageServer/rasterAttributeTable

JSON Response Syntax

{
"objectIdFieldName" : "<objectIdFieldName>",
"fields" : [
    {"name" : "<fieldName1>", "type" : "<fieldType1>", "alias" : "<fieldAlias1>", "length" : "<length1>"},
    {"name" : "<fieldName2>", "type" : "<fieldType2>", "alias" : "<fieldAlias2>", "length" : "<length2>"}
],
"features" : [ 
  <feature1>, <feature2>
]
}

JSON Response Example

{
 "objectIdFieldName": "OBJECTID",
 "fields": [
  {
   "name": "OID",
   "type": "esriFieldTypeOID",
   "alias": "OID"
  },
  {
   "name": "Value",
   "type": "esriFieldTypeInteger",
   "alias": "Value"
  },
  {
   "name": "Count",
   "type": "esriFieldTypeDouble",
   "alias": "Count"
  },
  {
   "name": "ClassName",
   "type": "esriFieldTypeString",
   "alias": "ClassName",
   "length": 50
  },
  {
   "name": "Red",
   "type": "esriFieldTypeSmallInteger",
   "alias": "Red"
  },
  {
   "name": "Green",
   "type": "esriFieldTypeSmallInteger",
   "alias": "Green"
  },
  {
   "name": "Blue",
   "type": "esriFieldTypeSmallInteger",
   "alias": "Blue"
  }
 ],
 "features": [
  {
   "attributes": {
    "OID": 0,
    "Value": 11,
    "Count": 19841817,
    "ClassName": "open water",
    "Red": 102,
    "Green": 140,
    "Blue": 190
   }
  },
  {
   "attributes": {
    "OID": 1,
    "Value": 12,
    "Count": 662596,
    "ClassName": "perennial ice/snow",
    "Red": 255,
    "Green": 255,
    "Blue": 255
   }
  }
  ]
}