Select to view content in your preferred language

Identify on Raster Values

1273
3
03-18-2013 07:42 AM
JohnBocan
Occasional Contributor
Question:  Is it possible to get the pixel value of a raster layer in a MapService using the Identify feature?  I've looked a bit in the forums and didn't see much on this or similar questions were left unanswered.  I am using Javascript 3.3 and I'm pulling a MapService from ArcGIS Server 10.1--specifically: http://atlas.wvgs.wvnet.edu/arcgis/rest/services/Coal_Web_Mercator/Pittsburgh_WM/MapServer where I'd like to pull from raster layers 6, 10, 14, 22 which deals with coal elevation and thickness.  I'm using the Find-Drilldown Identify tool (http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/find_drilldown.html) in my application.  I was able to employ it successfully with the vector layers. 

I'd appreciate some direction in this matter.

Regards,
John Bocan
GIS Programmer/Analyst
WVGES
0 Kudos
3 Replies
StephenLead
Honored Contributor
You could try using a queryTask instead of identify.

You may need to run multiple queryTasks (one for each layer you wish to run against, ie http://atlas...../MapServer/6, http://atlas..../MapServer/10, etc)

Brett Lord-Castillo put together a demo showing how to run multiple query tasks concurrently at http://jsfiddle.net/blordcastillo/mULcz/
0 Kudos
JohnBocan
Occasional Contributor
Thanks for the suggestion.  I will consider that query solution instead of the identify drilldown idea for my application (seems cleaner and more efficient!); however, it does not answer my main problem--apprehending the pixel value of a raster layer in a MapService and then displaying the value.  Both the identify and query means of showing data deal with "fields".  Rasters only have a "value" or "pixel value" and I've not found a good discussion on querying or identifying those in a MapService.  Any direction to further documentation or suggestions is greatly appreciated!
0 Kudos
SteveCole
Honored Contributor
This thread might be some help. It seems to suggest that the syntax for retrieving a pixel value might be:

idResults[0]['Pixel Value']


Haven't tried it so I'm just throwing it out there.

Steve
0 Kudos