I'm trying to take points that are identical in geometry and attributes (except for a duration attribute: number of seconds) and make them into a single point with the same attributes, but sum the duration attribute. The points need to be grouped by account number. I have tried using Aggregator, which is almost what I want, but that produces multipoint features, whereas I need single points.
Hi @kevwin,you probably need the geometry of one point with the duration values from all the identical points.
I would still use the aggregator but initially split the data into 2 streams, one without geometry (geometry remover) and aggregated to sum the duration values and a second sampled (sampler) to one point.
Then merge the two streams back into the geometry using the points id.
Hope this helps.
You could also use the Matcher, put a "List Name on SingleMatched Output" and put the same "group by" you used in the aggregator, into "Selected attribute" in the Matcher. Then use a ListSummer of the data coming out of the SingleMatched Port to calculate the entire duration.
There might also be some features that aren't Matched, so good idea to have something connected out of that port of the matcher as well.
Hi @kevwin, alternatively a pair of the GeometryExtractor and the GeometryReplacer might also be available.
- GeometryExtractor: Save the geometry as an attribute e.g. "_geometry".
Aggregator: Calculate the sum of the duration attribute and keep other attributes.- GeometryReplacer: Restore a single point geometry from "_geometry".
Hi @kevwin, alternatively a pair of the GeometryExtractor and the GeometryReplacer might also be available.
- GeometryExtractor: Save the geometry as an attribute e.g. "_geometry".
Aggregator: Calculate the sum of the duration attribute and keep other attributes.- GeometryReplacer: Restore a single point geometry from "_geometry".
I know this is old, but I needed to do this and your suggestion worked perfectly. Thank you, Randy McGregor