Identify Pixel Value From Raster Catalog

6488
17
12-06-2010 03:05 PM
RyanCoodey
Occasional Contributor III
I never could understand why, but ArcMap has never been able to identify pixel values from rasters in a catalog, only stand alone raster datasets (there is a request for this at ideas.arcgis.com).  This is the same functionality in ArcGIS Server and REST...

I had posted this similar question in the Silverlight/WPF forums over a month ago, but didn't find a solution: http://forums.arcgis.com/threads/16335-Raster-Catalog-Identify-Image-s-Pixel-Value-(And-Legend-Not-S...

Our users really need this functionality and since it is more a limitation of the REST API, I thought I would ask here...

- From what I can see there is no way in REST to get access to an individual raster in the catalog, is this true?
- Is there no way to trick the REST API to treat the catalog layer as a standalone raster?  I am assuming REST can do an identify for pixel values on a raster dataset, please correct me if I am wrong.
- Is there no way to get access to the underlying connection info of the layer (SDE Feature Class)?  Then I could perform some ArcObjects in my WPF application on it.
- Any other ideas?

Thanks a lot for any help!!!
0 Kudos
17 Replies
RaviNarayanan
Esri Contributor
At 10.0 Image Service supports Identify. Can this data be published as an image service?

http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/isidentify.html
0 Kudos
RyanCoodey
Occasional Contributor III
At 10.0 Image Service supports Identify. Can this data be published as an image service?

http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/isidentify.html



Thanks a lot for the reply Ravi!

Here is the problem, we would ideally like to publish as an image service, but for the following reasons, we cannot:
- Raster Catalogs cannot be published as an image service.
- Mosaic Datasets can, and they can point to a Raster Catalog, but they do not support classified renderers, which we need... These are not just aerial photos but continuous rate of change data grids. Maybe I am mistaken here?
- Mosaic Datasets seem a little funky with how they support date formats for time-aware content, but if I could work out the above issue I would look into this more.

So, I guess my problem also could be, how do I apply a classified renderer to mosaic dataset (in my Silverlight application)

Thanks again!
0 Kudos
WenxueJu
Esri Contributor
Ryan,

In this case, you want to identify original value (single-band) but want to render it to RGB in display. This goal can be achieved by using Raster Functions. Here are a few options and online resources:

(1) If the source data is 8-bit (0-255), you can specify a colormap function --- either on top of the mosaic dataset (its function tab) or in your REST request (through Silverlight API ArcGISImageServiceLayer.RenderingRule).
(2) If the source data is not 8-bit (e.g. temperature data), you may apply arithmetic function first (to manipulate data on-the-fly) before inserting colormap function.

Because these raster functions are applied on top of the mosaic, individual rasters in the mosaic dataset are intact; identify operation will return a RGB value of the mosaic result (after all the processing) and single-band pixel value of each raster at the identify location. Here is an example (case 2 --- temperature data)

http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/Temperature/ImageServer/identify?ge...

Regards,
Wenxue
0 Kudos
RyanCoodey
Occasional Contributor III
Wenxue,

Thanks a LOT for that information... This sounds like it will work just fine for us.  I will see what we can do!  Thanks again!
0 Kudos
RyanCoodey
Occasional Contributor III
Ok, got a Mosaic dataset setup... but I think I have hit a road block:

1) Looking into making a color map (clr or act) file... it seems to want a color for EACH value and only supports 8-bit/256 integers.  Our rasters in the catalog are 32-bit floating point, so there are THOUSANDS of values and this is unfeasible.  That is why we have a classified renderer on it and not a unique value renderer in ArcMap.  Can value "ranges" be specified in a color map?

2) I'm a little confused about time, we have a start and end time in a date field, but what do we choose for the "Time Value Format"? I'm used to putting dates in the format of MM/DD/YYYY but there are no options for that (they all have the year first)... and this is a date field, so it should know the format of it I would think... do I even need to set this?

Thanks!
0 Kudos
WenxueJu
Esri Contributor
1) Colormap doesn't support mapping a range of values. The workaround is to apply stretch function or arithmetic function (to stretch/squeeze to unsigned 8 bit) and then apply colormap function. This is what's applied to this temperature service:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/Temperature/ImageServer
2) "Time Value Format" is applied when you use a string/number to represent date. You don't need to specify "Time Value Format" when it's a date field.
0 Kudos
RyanCoodey
Occasional Contributor III
1) Colormap doesn't support mapping a range of values. The workaround is to apply stretch function or arithmetic function (to stretch/squeeze to unsigned 8 bit) and then apply colormap function. This is what's applied to this temperature service:
http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/Temperature/ImageServer
2) "Time Value Format" is applied when you use a string/number to represent date. You don't need to specify "Time Value Format" when it's a date field.


Thanks a lot Wenxue!

Still a bit confused with number 1.  Could you please explain a little more?  So I applied a stretch function, but the values in the raster go from -39 to 15... I tried using the strech to convert this to 0 to 255, but not real sure if that is what you are suggesting and how to properly do it if so.  Also I'm not real sure how to then take this and map it into a color map.  For example, -39 to - 30 range and map it into 0 - 255?  Do I have to calculate a percentage of the range and then get that same percentage of 0 - 255, which would be something like 0 - 40?

Not sure what to do with the Arithmetic approach either, again I assume I need to map -39 to 0 and 15 to 255... but not sure how, sorry.

*EDIT* Also, after applying a color map, ArcMap only seems to show the RGB values with the identify tool... am I doing something wrong?

Thanks for all the great help so far!!!
0 Kudos
WenxueJu
Esri Contributor
For range manipulation, you can do one of the following (assuming your input is from -39 to 15):
1. Arithmetic function (right click mosaic dataset in catalog window --> function tab --> insert on top of mosaic function): Choose "Plus" as operation, and use -39 constant value for Raster2. Results are "shifted" to positive range 0 - 54. You can have 55 colors now. If you're satisfied (You can have another arithmetic "times" to make it 0-254 etc if necessary), change the output type of the function (general tab) to unsigned 8 bit, then insert your colormap (a clr file ranged from 0 to 54 or else).
2. Stretch function (right click mosaic dataset in catalog window --> function tab --> insert on top of mosaic function): Choose "Min-Max" type, manually type in the desired output min/max (e.g. 0/54, 0/254, etc), then manually type in the input raster's statistics min/max (standarddeviation and mean are not needed for min-max stretch) --- in this case it's -39/15. It's easier to use it in your case compared to Arithmetic function. Change the output type of the function (general tab) to unsigned 8 bit, then insert your colormap.

Currently ArcGIS Server always convert colormap to RGB for display, so you don't have to insert ColormapToRGB function.

ArcMap's identify tool shows only one value: the value at current identify location after ALL on-the-fly processing, that is, after mosaic --- stretch ---colormap, so you'll have a RGB value. It's the system's limitation not to show values from individual rasters (before mosaic). If you make a REST/SOAP request, you'll find values of individual rasters as shown in the url of winter temperature service in previous post.
0 Kudos
RyanCoodey
Occasional Contributor III
Wenxue,

Thank you so much for all the help!  I got the mosaic dataset setup and it looks good.  I just gotta get it setup in my Silverlight app now and test it out there.  But I assume it will work are you said.  Thanks a lot!
0 Kudos