Select to view content in your preferred language

Is there a Summarize Field function?

1955
3
09-09-2011 07:21 AM
MichaelKohler
Frequent Contributor
I need to build a table for values in a FeatureLayer. I was looking for something like the Summarize option in ArcMap when you right click on a field in the table.

Currently, I have several query tasks running and would like to clean the code a bit as well as improve performance

Thanks!

Mike
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
Statistical information on QueryTask is new to API v3.0 and ArcGIS Server 10.1. You can join the beta community to try them out https://betacommunity.esri.com/community/notice/resource.html?r={D0FF1C13-907E-4756-AE7A-D9540AC3A9C...

With the current server and web API, you can use Linq query on the result, this should save you from performing multiple queries http://msdn.microsoft.com/en-us/vcsharp/aa336746. This seem related: http://forums.arcgis.com/threads/16305-Attribute-Query-Task-Question
0 Kudos
MichaelKohler
Frequent Contributor
That was pretty neat. THANK YOU. I don't think I even need to run a query. The last post of yours in the attached thread was what I needed.

I did:   var rv = from g in fl.Graphics group g by g.Attributes["Sold"];
I think it gave me what I wanted... It's 5pm and I can wait till tomorrow!

Thank you for all your help.
0 Kudos
AnastasiaAourik
Emerging Contributor
Hi Jennifer,
This is what I have in my silverlight app...

User can search for any registered place (any boundary) or draw a custom polygon, rectangle, circle;
Then our users can search for BIT RUNS (more than 3 mil points worldwide) with any filter they have defined,
such as BIT SIZE, Depth Range, whatever. I give user the option to return count only, or return features;
I have a limit of 1000 features returned so not so useful when the boundary is large, the the Barnett Shale Play region
in the US.
Thus, I was hoping to somehow return FREQUENCY counts by some other attribute such as BIT MANUFACTURER, HOLE_DIRECTION, or OPERATOR; This would return counts for each grouping the user chooses;  If I can display this in
a graph or pie chart, with click operation to further drill down (adding those additional attributes as filter) that would be useful;

I'm not sure if the best approach is to build a custom GP TOOL (pass in a polygon, pass in layer with filter, pass in user defined GROUP BY fields (from the BIT RUNS layer), and run it through a FREQUENCY tool, get the TABLE, return to client, take table data, draw the chart, etc etc...
-or-
Implement a SOE that has a QUERY-GROUP-BY task, like a query tool, only the extras would be the GROUP BY attribute (a text only field) and internally it does the FREQUENCY tool task, returning the Table via rest...

So is this new Summarize field function something that you are building so that one may GET QUERY COUNTS GROUPED BY
ATTRIBUTE X?
0 Kudos