Select to view content in your preferred language

widget for identify values in raster data  using ARCGIS VIEWER for flex.

4138
25
Jump to solution
10-31-2012 03:55 AM
NadeemQazi
Regular Contributor
I have used Kernel Density tool from the spatial analyst tool on one of my layer in the map document. the result is generated as raster data.i used identify tool (in the ARCMAP) to find the density at any point. However I want to do the same job from client side  using ARCGIS VIEWER for flex.

The things i want to know is :
should i publish map as map service or image service to access the density at every point under browser. and am i right is thinking to use identify task or is there some other trick. please give suggestion. is there any widget available.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AnthonyGiles
Honored Contributor
Nadeem,

The reason that it was not working when you had the setting on true was that you were asking it to return fields that are not in that layer (i.e. Zoning Type and Zoning Name). Setting the value to false you are ignoring those settings and just showing everything that is returned. If you want to be more specific in what is shown on the return you have to set the value to true then set up the fields that you want to return for each layer. These fields must match the ALIAS names in the REST endpoint.

If you want to do an identify task then make a decision on the result you will need to program your own widget using the uncompiled code in flash builder.

Please do not forget to mark this post as answered and start a new post if you have more queries.

Regards

Anthony

View solution in original post

0 Kudos
25 Replies
AnthonyGiles
Honored Contributor
Nadeem,

If you publish your image as part of a map service you can use the identify tool to return pixel values:

http://www.arcgis.com/home/item.html?id=39cf66d58c234279ba728c50461a1a89

This advise has been given before in this post:

http://forums.arcgis.com/threads/67208-kernel-density-on-raster-image-using-flex-API-or-geoprocessin...

Are you having difficulty with the process, if so please explain

Regards

Anthony
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

If you publish your image as part of a map service you can use the identify tool to return pixel values:

http://www.arcgis.com/home/item.html?id=39cf66d58c234279ba728c50461a1a89

This advise has been given before in this post:

http://forums.arcgis.com/threads/67208-kernel-density-on-raster-image-using-flex-API-or-geoprocessin...

Are you having difficulty with the process, if so please explain

Regards

Anthony


Thanks for reply. I did use this widget however i was unable to specify my map 's layer in it. I Can see the widget in my application however it shows predefined layers not the layers from my map. I have checked its  XML file but could not get any thing. is there any link which shows how to use this widget in arcgis viewer for flex.
0 Kudos
AnthonyGiles
Honored Contributor
Nadeem,

Robert has included a PDF document in the download that explains how to set up the widget.

Regards

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
Once  you get it configured to use your layers instead of the default in the identifyWidget.xml, you may have issues with raster data.

I had to set <fields all="true" /> in the identifyWidget.xml for my raster layer in order to get the results.

In case this help,

R_
0 Kudos
NadeemQazi
Regular Contributor
Once  you get it configured to use your layers instead of the default in the identifyWidget.xml, you may have issues with raster data.

I had to set <fields all="true" /> in the identifyWidget.xml for my raster layer in order to get the results.

In case this help,

R_


I use with <fields all="true" /> . ihave just one rast layer in my map.  i used following line in the xml file
<name>kerneldensity</name>
            <fields all="true">
                <field name="kerneldensity" alias="kerneldensity"/>
                <field name="ZONING_TYPE" alias="Zoning Type" popuponly="true"/>
            </fields>

this lines does produce the name of the layer in the widget,however when i chose point and click on the layer to check the density i did nt find any thing in result window. i also checked it with lines make a ploygon  but it also did not produce any layer. please note it that i have created this raster layer by using kernel density function in the arcmap and for simplicity i have just used only the raster layer in my map. any suggestion.
0 Kudos
AnthonyGiles
Honored Contributor
Nadeem,

Have you added your layer as a basemap or operational layer? If it is a basemap make sure you have changed the tag called excludebasemaps to false

Regards

Anthony
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

Have you added your layer as a basemap or operational layer? If it is a basemap make sure you have changed the tag called excludebasemaps to false

Regards

Anthony


i did it making it false however still it says no result found.there is only one raster layer in my map.i have use it as base map and make excludebasemap layer to false. When i use identify tool on this raster layer in arcmap it displays kernel density as value of pixels,in other word value of the pixel represent the kernel density value. I have published it as simple  map service. any suggestion
regards
nadeem
0 Kudos
AnthonyGiles
Honored Contributor
Nadeem,

I have published elevation data in the exact same way in which you are publishing your data. I found that although the alias in the REST endpoint for the pixel value says Value it actually returns as 'Pixel value' so the layers tag looks like this:

<layer>
<name>DTED2</name>
<fields>
<field alias="Height" name="Pixel Value" />
</fields>
.......
</layer>

Are your field names an exact match to the Alias field in the REST endpoint?

Is your service publicly available so we can look at it

Regards

Anthony
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

I have published elevation data in the exact same way in which you are publishing your data. I found that although the alias in the REST endpoint for the pixel value says Value it actually returns as 'Pixel value' so the layers tag looks like this:

<layer>
<name>DTED2</name>
<fields>
<field alias="Height" name="Pixel Value" />
</fields>
.......
</layer>

Are your field names an exact match to the Alias field in the REST endpoint?

Is your service publicly available so we can look at it

Regards

Anthony

thank you very much for your help. if u like i can email you the data so that u can look on it.  is it ok. meanwhile i m trying your new  suggestion.
0 Kudos