Skip to main content

Hi! I need to find a Neighbor Line to the line. I am interested in the average distance between these neighbors. Using NeighborFinder i have only the closest vertex of the line. I need tej farthest too.

You can split your line into vertex (LineDivider). Then for each vertex generated, find the closest line (NeighborFinder). You can calculate the average with a StatisticsCalculator


Here's a quick stab at it.

none2none.fmw

I break down the base and candidate lines into their indivudual points, then run the NeighborFinder without a max candidates or max distance parameter set. Then find the max distance per base point (by sorting the candidate list), aggregate them and the again sort the candidate list to get the max distance overall.


You can split your line into vertex (LineDivider). Then for each vertex generated, find the closest line (NeighborFinder). You can calculate the average with a StatisticsCalculator

Ah jeez... I forgot about the StatisticsCalculator... Yeah, that would be a better solution than what I just built ;)

 

 


Thanks a lof for your help @lau and @redgeographics

But i found a little problem. What if i have 2 lines candidates 1:on the left and 2: on the right side of the base-line? i would like to find a neighbor in each of candidates


Thanks a lof for your help @lau and @redgeographics

But i found a little problem. What if i have 2 lines candidates 1:on the left and 2: on the right side of the base-line? i would like to find a neighbor in each of candidates

The NeighborPairFinder may help you. By setting a minimum separation angle of 180 (more or less) you may get what you need.

 

 


Reply