Skip to main content
Solved

NeighborFinder line

  • September 28, 2018
  • 5 replies
  • 290 views

Forum|alt.badge.img

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.

Best answer by lau

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

lau
Forum|alt.badge.img+3
  • 65 replies
  • Best Answer
  • September 28, 2018

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


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3702 replies
  • September 28, 2018

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.


redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3702 replies
  • September 28, 2018

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

 

 


Forum|alt.badge.img
  • Author
  • 14 replies
  • September 28, 2018

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


lau
Forum|alt.badge.img+3
  • 65 replies
  • September 28, 2018

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.