Skip to main content
Can the NeighborFinder transformer be set to only link features that are of a certain angle range from each other?

 

 

For example, I have two parallel lines running in the east/west direction that represent the edge of the pavement of a road. If there is a point feature somewhere between those lines, can I find it's nearest neighbor line in the North direction (even though the southern line may be closer)?.

 

 

Text Diagram:

 

________________________________________________________ North Line

 

                                   

 

 

                                                    .    Point Feature

 

________________________________________________________ South Line

 

 

Is there any way to link that point to the North Line?
Hi,

 

 

One possible solution is: 1) Append unique identifier attribute to every point, e.g. "_point_id".

 

2) Send the points to BASE, the lines to CANDIDATE of the NeighborFinder. And specify "Close Candidate List Name" parameter, e.g. "_close".

 

3) Apply a ListExploder to MATCHED points. After exploding by "_close{}", every point will have "angle" and "distance" attributes which are the information of location on a line within the specified distance.

 

4) Filter the points by the specified angle range. Assume each point has min / max of the angle range.

 

5) Sort them by "distance"  ascending.

 

6) Use a DuplicateRemover grouping by "_point_id" to select points having minimum distance in the same "_point_id"; i.e. each first point in the same "_point_id" group.

 

 

Takashi

Reply