Skip to main content
Solved

Updates within a table based on consecutive attribute values

  • June 23, 2022
  • 2 replies
  • 17 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3422 replies
  • 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
  • 13 replies
  • June 23, 2022

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