AnsweredAssumed Answered

Querying Image Service's raster table

Question asked by myESRIUName on Jun 2, 2016
Latest reply on Jun 22, 2016 by myESRIUName

I am working with ArcGIS Server and Desktop 10.4 and creating an application using the JSAPI 3.16.


I have a TIF that has an attribute table associated with it. I am trying to publish this image as an ArcGIS Server service that I will be able to query; e.g., return records where 'field1'=1 and 'field2'=2. There are a number of fields and an example of the previous query might return anywhere from none to a couple hundred pixel values which could have any number of pixel counts associated with them in the raster itself. The idea is to use a ColorMap to display the 5 - 10 most prevalent combinations in a Map object.


  • I've tried sharing the tif as an image service but don't seem to get access to the query functionality (using the URL to .../ImageServer/query). I am told 'Requested operation is not supported by this service.'
  • I've tried publishing a RasterDataset but, again, don't get access to the query functionality.
  • I've tried creating a map service with the tif and publishing that as a map service, but couldn't seem to get at the attribute data. There were no fields showing up for that layer in the map service definition.
  • I've tried creating a mosaic dataset and, although I finally have access to the query functionality for the Image Service, I can only query the mosaic dataset's table, not the contents of the image itself.
  • I looked into using a RasterDataSource in JavaScript but couldn't get it working and couldn't find an example.


So, I guess my first question what I am trying to do even possible? And, if so, can someone tell me the basic combination of things I should be putting together to achieve it?


At the moment, I can get what I need to work if I create a second ArcGIS Service from a fake point layer that I made where every point is at 0,0 and each record is basically just the same attributes as the raster attribute table. I can certainly query that, but I don't want two copies of essentially the same information on the server because they could become inconsistent if the raster data is updated. Also, I don't want to waste resources running a second service that's only there so I can query what I feel like I should be able to get at somehow through the image service itself...if only I knew how.


Any pointers anyone can offer are appreciated.