Skip to main content
Solved

Combining weighted attributes into a new attribute in FME Desktop

  • January 28, 2021
  • 2 replies
  • 37 views

Hi all, I have a seemingly easy question. I have two feature classes that I have spatially joined using the spatial relator. There are two cities fields in this new feature. For the sake of the example, we can refer to them as Cities A and Cities B. Some values are null in both fields, however the Cities A is more accurate.

 

How do I combine Cities A and Cities B into a new field with priority given to Cities A, assuming it is not null. i.e. if Cities A is null and Cities B has a value, we use Cities B. If Cities A and B both have values for a feature, then only Cities A would be used.

Best answer by nielsgerrits

One way to do this is to use Conditional values. This can be used in an AttributeCreator or AttributeManager. Create a new attribute called Cities and use a Conditional for the value. When Cities A has a value use Cities A, else when Cities B has a value use Cities B.

2021-01-28_07h19_192021-01-28_07h20_30

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

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • Best Answer
  • January 28, 2021

One way to do this is to use Conditional values. This can be used in an AttributeCreator or AttributeManager. Create a new attribute called Cities and use a Conditional for the value. When Cities A has a value use Cities A, else when Cities B has a value use Cities B.

2021-01-28_07h19_192021-01-28_07h20_30


  • Author
  • 1 reply
  • January 28, 2021

One way to do this is to use Conditional values. This can be used in an AttributeCreator or AttributeManager. Create a new attribute called Cities and use a Conditional for the value. When Cities A has a value use Cities A, else when Cities B has a value use Cities B.

2021-01-28_07h19_192021-01-28_07h20_30

Worked like a charm. Many Thanks!