There's probably a few different ways you could achieve this
Use adjacent attribute handling and conditional tests to assign groups based on the Distance value assuming your points are in order
or
Combine all your points into one line, split into segments with a chopper, discard segments greater than 2m and then combine adjacent lines
Hi @keller
Attached Workspace.
Thanks in Advance,
Danilo
Hello @danilo_fme , many thanks for your feedback, i have tried to replicate the workflow and I noticed the 1st Linebuilder excludes point number one in the dataset , yet it falls with the 2M threshold,so i did try using @ebygomm 's second option where i used a linebuilder without any groupby option , i got one line then did a PointOnLine overlayer to split the line based on points and filtered out the ones with a length of over 2M and combined the lines back to get what i was looking for.
Many thanks for the ideas😂 .
There's probably a few different ways you could achieve this
Use adjacent attribute handling and conditional tests to assign groups based on the Distance value assuming your points are in order
or
Combine all your points into one line, split into segments with a chopper, discard segments greater than 2m and then combine adjacent lines
Hello @ebygomm , thanks for the feedback, i am not able to see the conditional statement in full, would you please maybe share what's in the elseif clause?I could borrow some logic from it.
Thanks,
Keller.
Hello @ebygomm , thanks for the feedback, i am not able to see the conditional statement in full, would you please maybe share what's in the elseif clause?I could borrow some logic from it.
Thanks,
Keller.
I've updated the screenshot
The conditional statement is first checking if the previous features group attribute has a value, this basically is a check to see if it's the first feature, if it is the value of group gets assigned as zero. Otherwise it looks if the value of distance of the current feature minus the value of the distance of the previous feature is less than 2, if it is it uses the previous value of group, otherwise it increments group by 1.
This group attribute can then be used as a group by in the line builder
Hello @ebygomm , thanks for the feedback, i am not able to see the conditional statement in full, would you please maybe share what's in the elseif clause?I could borrow some logic from it.
Thanks,
Keller.
Hello @ebygomm , many thanks for the feedback, you saved the day, this is exactly what i was looking for, one last thing, i was not able to use your if clause, the Group values of sections (118-150) were always missing or null, so i added a counter before the first attribute creator and used the below clause to achieve,
Please let me know if there is something i missed out. But so far consider my question answered.
Regards,
Keller.