Skip to main content

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

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
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 :)

 

 

 

 

 
I forgot to post the "Dear_Neighbours_4_2" paramaterscreen..

 

 

 


Thanks Gio this looks great!

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

Reply