Skip to main content

Dear All,

I am attempting to spatially join the nearest points based on a one-to-one relationship but cannot get it to work. Below is a graphical example of my query:

I aim to join the closest yellow dot (627 records) to the nearest black dot (71,533 records). Essentially, I want the Neighbourfinder to identify the closest one-to-one relationship and disregard the others. The default settings of the transformer calculate the nearest points for all 71,533 records, which I wish to avoid. My objective is to integrate the information from the yellow dots into the black dots for only the 627 closest records.

 

Any ideas? 

Thanks :)

Something like this?

Note that one black point may be closest to several yellow points.


Thanks ​@geomancer but I need it the other way around. the base need to be the 71,533 records and the candidate the 627 in order to bring the closest yellow info into the nearest black points. 

I’m trying to follow this post but can’t get it to work: 

 


You can join the results to the black points (provided the black points have some unique ID).

 


Hi ​@galigis ,

Another thought.

  1. Send the yellow points to Base port, send the black points to Candidate port of the NeighborFinder.
    • Number of Neighbors to Find: 1
    • Merge Attributes: [check]
    • Acuumulation Mode: Merge Candidate (or "Replace with Single Candidate" if it's not necessary to keep attributes of yellow point)
  2. On MachedBase features, replace coordinates with x, y of the closest candidate (i.e. black point) using VertexCreator.
    • Mode: Replace with Point
    • X Value: _closest_candidate_x
    • Y Value: _closest_candidate_y 

Brilliant ​@geomancer and ​@takashi . Both solutions worked perfectly! :)