Select to view content in your preferred language

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

4140
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
25 Replies
AnthonyGiles
Honored Contributor
Nadeem,

How big is the file? If it is small enough to email then by all means send it to me, my email address is the same as my username for this forum. I will not be able to look at it till later next week though.

Regards

Anthony
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

How big is the file? If it is small enough to email then by all means send it to me, my email address is the same as my username for this forum. I will not be able to look at it till later next week though.

Regards

Anthony


thank you total size is about 25MB, I have just emailed them from my account nadeemhqazi@yahoo.com in set of two email. The path of source file is "C:\wexford\data\test3" please extract the rar file(kerneldensity) under this path and copy the rest of the two  files(kerneldesnity.aux,kerneldensity.ovr,rasteronly) in C:\wexford\data\test3. the name of the map file is rasteronly. I am sending  these file in another email becaz of the size problem

I have published  it as map service on arcgis server10.1 and using the arcviewer for flex and the identify flex i a m trying to find the kernel density . please have a look and let me know what i am doing wrong. I appreciate your time.
regards
nadeem
0 Kudos
ChristopherBlinn1
Deactivated User
Nadeem,

I had to create a Raster Attribute Table to get the identify to work in my application.

You have to convert the values to integer values but with a little math using the Raster Calculator I got it all done, and it works like a charm.

I cannot tell if this is absolutely necessary but it did resolve my issue with identifying raster pixel values.

Hope this helps!
Chris B.
0 Kudos
RhettZufelt
MVP Notable Contributor
What version of the Identify widget are you using?  In the earlier versions, If I had the actual name of a raster layer in the <layers> area, I could not get the pixel values.

had to code it like:

 <fields all="true" />
         


With no name and/or fields, then it would report the class and pixel value of the raster.

With the latest identify widget I am able to configure like such and get the data returned:

 <layers onlythese="true">
  <layer>
   <name>Elevation</name>
   <fields all="false">
    <field name="Pixel Value" alias="NAVD88 (m)"  numberformat="2|,|." />
   </fields>


R_
0 Kudos
AnthonyGiles
Honored Contributor
Nadeem,

I published your data using 9.3.1 on our server and tested the identify widget which returned no result. Using firebug in Firefox I examined the request that was getting sent and the response. It seems that the server does not like the spatial reference details that it is being sent and is returning an error.

The solution I found was to put the attribute wkid="29900" in the map tag in the main config file to force the application to use the correct spatial reference.

All I had set in the identify tool was excludebasemaps set to false and <fields all="true" />. This returned the correct pixel value.

I must add this was done with v2.5 and server 9.3.1

Regards

Anthony
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   I just need to interject that you need to be careful not to confuse attributes between my widgets. The <fields all="true" /> is from the eSearch widget and not the Identify widget. There is no code what so ever in the Identify widget that uses all="true" in the fields element. 😉
0 Kudos
AnthonyGiles
Honored Contributor
Robert,

Quite correct, I meant <layers onlythese="true">

I think I just picked up on something further up the thread and didn't check.

Sorry for any confusion Nadeem,

Regards

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
All,

   I just need to interject that you need to be careful not to confuse attributes between my widgets. The <fields all="true" /> is from the eSearch widget and not the Identify widget. There is no code what so ever in the Identify widget that uses all="true" in the fields element. 😉



Whoops, guess I carried that over from the Identify widget 3.0i example.xml that does have the  <fields all="true" /> in it.  Will make sure I update my configs.


R_
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

I published your data using 9.3.1 on our server and tested the identify widget which returned no result. Using firebug in Firefox I examined the request that was getting sent and the response. It seems that the server does not like the spatial reference details that it is being sent and is returning an error.

The solution I found was to put the attribute wkid="29900" in the map tag in the main config file to force the application to use the correct spatial reference.

All I had set in the identify tool was excludebasemaps set to false and <fields all="true" />. This returned the correct pixel value.

I must add this was done with v2.5 and server 9.3.1

Regards

Anthony


Hi anthony
I applied as u wrote . here is the line i modified in the config file:
<map wkid="29900" esrilogovisible="true" openhandcursorvisible="true" scalebarvisible="true" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="true" top="40">

than in IdentifyWidget_1.xml i used this tag: i just change tje name to kerneldensity whihc is the nameof mylayer and left other as default.
<layer>
            <name>kerneldensity</name>
            <fields>
                <field name="ZONING_NAME" alias="Zoning Name"/>
                <field name="ZONING_TYPE" alias="Zoning Type" popuponly="true"/>
            </fields>
            <links>
                <link includeinresults="false" field="" alias="" tooltip="">
                    <linkprefix/>
                    <linksuffix/>
                    <iconfield/>
                    <iconprefix/>
                    <iconsuffix/>
                </link>
            </links>
            <zoomscale>15000</zoomscale>
            <forcescale>true</forcescale>
        </layer>


However it still produce me No result. please note that when i used  identify widget it has created two files IdentifyWidget_1.xml and IdentifyWidget.xml.  I modifed IdentifyWidget_1.xml with the above modification. Please also let me know how did you find error with firebug as i am trying to catch error .
regards
nadeem
0 Kudos
RhettZufelt
MVP Notable Contributor
Nadeem,

It shouldn't make any xml files, just the swf when you compile.

However, if you do have two xml files, did you make sure that your widget tag in the config.xml points to the one you are modifying?

        <widget label="Identify" left="430" top="80" height="150"
                icon="assets/images/i_info.png"
                config="widgets/Identify/IdentifyWidget_1.xml"
                url="widgets/Identify/IdentifyWidget.swf"/>


R_
0 Kudos