Skip to main content
Solved

Combining weighted attributes into a new attribute in FME Desktop


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

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

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+55
  • 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
  • January 28, 2021
nielsgerrits wrote:

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!


Reply


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