Skip to main content
Solved

Transfer attributes from neighbouring text features

  • October 25, 2017
  • 5 replies
  • 35 views

whkarto
Contributor
Forum|alt.badge.img+14

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!

Best answer by takashi

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

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.

5 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • October 25, 2017

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


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • October 25, 2017

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


takashi
Celebrity
  • Best Answer
  • October 25, 2017

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


takashi
Celebrity
  • October 25, 2017

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

global-variables.fmwt (FME 2017.1)

 

 


whkarto
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • October 25, 2017

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.