Skip to main content
Solved

NeighborFinder based on attributes

  • August 27, 2024
  • 2 replies
  • 119 views

1sean
Contributor
Forum|alt.badge.img+4
  • Contributor

Hi all,

is it possible to use the NeighborFinder so that it tries to find the closest feature with a matching attribute inside the maximum distance area first?

My goal is to find for my base features the closest feature from the candidate features which has the same attribute, but inside the maximum distance of lets say 20 meters. And only if there is no candidate feature with the same attribute inside those 20m, find the closest feature no matter the attribute inside 20m.

What would be the best way to accomplish this in FME?

 

Best answer by s.jager

I think I would solve this by using two NeighborFinders: The first one set to use Group Processing with a max distance, the second one without the Group Processing but wth the max distance, and only those features that haven’t found a match yet.

Haven’t tested that, but AFAIK that should do it. 

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

2 replies

s.jager
Influencer
Forum|alt.badge.img+16
  • Influencer
  • Best Answer
  • August 27, 2024

I think I would solve this by using two NeighborFinders: The first one set to use Group Processing with a max distance, the second one without the Group Processing but wth the max distance, and only those features that haven’t found a match yet.

Haven’t tested that, but AFAIK that should do it. 


1sean
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • August 27, 2024
s.jager wrote:

I think I would solve this by using two NeighborFinders: The first one set to use Group Processing with a max distance, the second one without the Group Processing but wth the max distance, and only those features that haven’t found a match yet.

Haven’t tested that, but AFAIK that should do it. 

Hi @s.jager, thanks for your input. It took me a while to understand the group processing in this transformer because my features had different column names. But naming both the same, and selecting the column in the group-by gives me the result I was looking for.


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