Skip to main content
Solved

How to compare attribute of previous feature and detect change

  • September 14, 2017
  • 4 replies
  • 226 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.

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

4 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • 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
Influencer
  • 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?


fmelizard wrote:

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

 


takashi wrote:

@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.

 


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