Skip to main content
Question

Calculating Cumulative Distances for Different Groups of Points


danraleigh
Contributor
Forum|alt.badge.img+4

I have a workflow that assesses the proximity of points along lines. These points extend along a series of line segments of varying lengths. For instance, the distances to the next points might be 0ft (the start), 100ft, 100ft, 200ft, and 250ft, so I would like for the corresponding field next to these values to display 0ft, 100ft, 200ft, 400ft, and 650ft, etc.

 

I am aware of the workflow to find cumulative sums (Attribute Creator>Statistics Calculator>Attribute Renamer). While this processes as described, I regret that the cumulative sums do not “reset” when there’s more than one batch of point data within the feature table (the initial point of an additional batch of points simply takes the prior set’s end sum and begins adding new distances from there). If there’s a way to prompt the cumulative sums to account for new “initial” points in a feature dataset and so start from scratch each time, I would greatly appreciate any insight on how to prompt that to occur. I’m happy to share my workbench for anyone interested in reviewing my workflow.

2 replies

hkingsbury
Celebrity
Forum|alt.badge.img+54
  • Celebrity
  • January 5, 2025

Assuming all parts of each ‘batch’ have an ID that associates them, you can use the ‘Group By’ option in the statistics calculator.

There is some good information on Group By here: https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Group_Based_Transformers.htm


danraleigh
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • January 7, 2025

As it turns out, this was a “user error”. I have dozens of fields in the product from the initial workflow that I set up and described above, and I overlooked the field that did “reset” at the first point of another group. There is also a field that cumulatively sums distances across all points, but I intend to ignore that. Thank you for your time!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings