Skip to main content
Solved

How to compare attribute of previous feature and detect change

  • September 14, 2017
  • 4 replies
  • 309 views

Hello,

I have a sequence of points along a line. I have to detect change in an attribute (called "framing") of a point from its previous point. The points are sequential. Sequences are stored as an attribute too "sequence". I imagine I can use an AttributeCreator to create a new attribute called "change" and make the value conditional. Problem is, I am not good at RegEx or conditional statements to know what would be useful.

I need to compare the "framing" attribute with only the previous point within the sequence. Not the one ahead.

I have been trying to follow the example in the thread below but no luck.

https://knowledge.safe.com/questions/33705/compare-attributes-from-two-features.html

 

Eg, if there is a way to compute something along these lines:

IF point.framing = point(sequence-1).framing

Then, Change = No.

Any help will be appreciated.

PS: Working with FME 2016.0

Best answer by fmelizard

Hi @fariyafarhad, FME has the ability to use adjacent features. If your points are sequential, you might be able to compare using this option.

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.

4 replies

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • Best Answer
  • September 14, 2017

Hi @fariyafarhad, FME has the ability to use adjacent features. If your points are sequential, you might be able to compare using this option.


takashi
Celebrity
  • 7843 replies
  • September 14, 2017

@fariyafarhad, I think that the AttributeCreator or the AttributeManager with the Enable Adjacent Feature Attributes option helps you. Could you please post the screenshot that illustrates relevant parameters setting in your workspace?


  • Author
  • 62 replies
  • September 15, 2017

Hi @fariyafarhad, FME has the ability to use adjacent features. If your points are sequential, you might be able to compare using this option.

Hello @TiaAtSafe

 

Thank you for your pointer. That definitely help me set up the parameters

 


  • Author
  • 62 replies
  • September 15, 2017

@fariyafarhad, I think that the AttributeCreator or the AttributeManager with the Enable Adjacent Feature Attributes option helps you. Could you please post the screenshot that illustrates relevant parameters setting in your workspace?

Hello @takashi. I was able to use the AttributeCreator transformer with Adjacent Feature enabled to come up with the solution.