Summarize and Sum Features?
I have a featureset with VEGCODE and area (IntArea below). I'd like to get all the distinct vegcode and get the sum of the intarea field per vegcode. Any ideas how to achieve this?

-
You could do it with an expression. The featureSet .features property is an array so you could daisy chain the .reduce() and .map() functions on it to get what you need.
The .reduce() function is a bit complicated though, so you may prefer to use workflow activities instead. In that case, I would first create a new array for your graphics. Then iterate over the .features with a forEach loop and check whether the array contains a feature with its code. Based on this, either place the graphic into the new array or recalculate the existing feature's area.
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar