How to summarixe attribute values in large feature sets
I am struggeling with a workflow that, based on a user defined area, queries a population grid, and then present summarized population statistic to the user. Each population cell has a number of attributes that should be summarized individually for the selected area.
The problem is that the featureset returned from the query is quite large (> 100 000 records), and summarizing the population using a ForEach loop on the feature set is way too slow. The workflow times out during this activity.
I have been looking at the Output Statistics option in the Query Task, but I can't make it work when querying using a geometry. It only works when input Geometry is ommitted...
I have also looked at the featureSet.Features.Sum option that appears when using Intellisense in Workflow Designer, but I can't figure out how to use it.
If you have any sample that summarizes featureset attributes without having to loop through the featureset, please let me know :)
Thanks, Martin
0
-
I just tried the QueryTask with outputstatistics and both with and without a geometry set, but it seems to work as expected. Maybe you could post a (small) workflow that reproduces this issue?
If you have proper access to the ArcGIS Server, another approach would be to create a Geoprocessing Task that does the heavy lifting, and invoke that from the workflow.0 -
I have not tried this, but just a thought. Convert the FeatureSet to a DataTable and use the "Invoke Method" activity to execute the DataTable classes' "Compute" method:
https://msdn.microsoft.com/en-us/library/system.data.datatable.compute(v=vs.110).aspx0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare