Solved

Transfer attributes from neighbouring text features

  • 25 October 2017
  • 5 replies
  • 0 views

Badge +11

Hi,

I'm facing some troubles to figure out how to transfer some attributes that are present on some text lines to subsequent text line features.

See below a screenshot of my data situation

Whenever -99 occurs a new dataset begins. The next two number are static values and then various measured records will occur. What I'm trying to achieve is, to pass on the two static values to every record ot the dataset. As soon as a new dataset (-99) begins the mechanism should reset and now use use the most recent values for inheriting.

Find attached my current workspace together with a small sample dataset.

 

Thanks for your help!

icon

Best answer by takashi 25 October 2017, 18:21

View original

5 replies

Userlevel 1
Badge +21

Take a look at the adjacent attribute handling capablilities under advanced attribute value handling in the attribute creator. This will allow you to set a value of an attribute based on a value in the previous feature

inherit-attributes.fmw

Userlevel 1
Badge +21

As an aside, if your data is as per your sample, it's a lot easier if you read the text file as column aligned text

Userlevel 2
Badge +17

Hi @whkarto, if I understood the requirement correctly, this workflow would be a solution.

Userlevel 2
Badge +17

Hi @whkarto, if I understood the requirement correctly, this workflow would be a solution.

global-variables.fmwt (FME 2017.1)

 

 

Badge +11

Hi @whkarto, if I understood the requirement correctly, this workflow would be a solution.

@takashi Thanks a lot! Once again you did it! The approach with variables ist really clever, although you'll have to make sure that data schema is strictly obeyed. But that could be done in advance.

 

Reply