Skip to main content
Solved

Updates within a table based on consecutive attribute values


pschout
Participant
Forum|alt.badge.img+2

Dear colleagues,

I'm looking for a way to perform updates within 1 table based on consecutive attribute values. In the attached picture I want to increase/adjust the “Traject_volgnr” if this condition is met for 2 consecutive features : “Route4” is the same but the difference between the consecutive “Hm_pos” is greater than 2.

 

In the example this should give the following result: Line 15089 - 15093 the "Traject_volgnr" remains 1 but in lines 15094 - 1598 the "Traject_volgnr" changes to 2 (or another value).

FME update 

 

Best answer by ebygomm

So if you turn on Adjacent Attribute Handling in the Attribute Creator and look at 1 previous feature you can then do a conditional statement something like this.

imageTesting if the Route4 attribute matches the value of the previous feature and checking if the difference in Hm_pos is greater than 2. If these conditions are met you then set Tracject_volgnr to something else

View original
Did this help you find an answer to your question?

2 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • June 23, 2022

So if you turn on Adjacent Attribute Handling in the Attribute Creator and look at 1 previous feature you can then do a conditional statement something like this.

imageTesting if the Route4 attribute matches the value of the previous feature and checking if the difference in Hm_pos is greater than 2. If these conditions are met you then set Tracject_volgnr to something else


pschout
Participant
Forum|alt.badge.img+2
  • Author
  • Participant
  • June 23, 2022

Thank you! this is exactly what i was looking for. I've implemented it and it works great!

 

 

 


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