Skip to main content
Question

NeighborFinder 2015

  • September 3, 2015
  • 5 replies
  • 17 views

owen
Forum|alt.badge.img+1

Hello, 

 

 

In recent versions of FME, the NeighborFinder asks for the number of neighbours to find. Does anyone know if the behaviour of the transformer will return the nearest feature first? Or does it find the first x number of features depending on the order the candidates? Ie not necessarily the nearest?

 

 

Many thanks, 

 

 

Owen

5 replies

david_r
Evangelist
  • September 3, 2015
Hi

 

 

From the help (http://docs.safe.com/fme/html/FME_Transformers/FME_Transformers.htm#Transformers/neighborfinder.htm):

 

 

Number of Neighbors to Find

 

The maximum number of candidate features that will be included in the list specified by the Close Candidate List Name parameter. The closest candidate features will be included in the list.

 

 

I understand that to be the n closest candidates.

 

 

David

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • September 4, 2015
I like to share with the community the way i created a iterative neighbourfinder.

 

This will remove from subsequent searches pairs wich are mached. I also built in an option to keep candidates. (crearting a option for keep bases milarily created, but i had no use for that).

 

 

The trick is mainly in overcomming the single loop limitation of customtransformers.

 

 

I post it here without further comment, just annotations.

 

 

 

 

custom set up including parameters:

 

 

 

blocking transformer wich u have to create before the "shell" customtransformer:

 

 

 

 

the blocking transformer's user  parameters:

 

 

 

this custom transformer save me a bunch of time and hassles.

 

the greyed out bit in the blocking is used for a non linear search radius increment.

 

 

 

hope it can be usefull to you too :)

 

 

 

 

 

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • September 4, 2015
I forgot to post the "Dear_Neighbours_4_2" paramaterscreen..

 

 

 


owen
Forum|alt.badge.img+1
  • Author
  • September 4, 2015
Thanks Gio this looks great!

Forum|alt.badge.img+2
  • January 5, 2016

Just to publish David's comment as an answer:

From the help (http://docs.safe.com/fme/html/FME_Transformers/FME_Transformers.htm#Transformers/neighborfinder.htm):

 

 

Number of Neighbors to Find

 

The maximum number of candidate features that will be included in the list specified by the Close Candidate List Name parameter. The closest candidate features will be included in the list.I understand that to be the n closest candidates.

 

 

David

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