Skip to main content
Question

Finding pair of points out of a bunch of points

  • January 24, 2017
  • 4 replies
  • 94 views

femo
Contributor
Forum|alt.badge.img+6

Hello,

I need to find those two pair of points that correspond to the following rule:

1. Corresponding points share the same MAIN_ID

2. The absolute value of the difference of attribute value WINKEL of the two corresponding points is exactly 3.14 (pi)

3. The points are within a certain distance to each other

In the following Image you see 4 points that share the same MAIN_ID. However, it could be many more points. All points have an attrribute WINKEL, the values are labelled in red. The green ellipses mark the pair of points that belong together.

Any clue how to achieve this without using python?

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.

4 replies

redgeographics
VIP
Forum|alt.badge.img+63

You can cover #1 and #3 with a NeighborFinder, grouping by MAIN_ID, and I think I've got the rest worked out like this:

The test is @abs(@Value(_list_number)-@Value(number)) = 8

 

(in your case that would be 3,14)

I don't think I'm all the way there yet, but this should hopefully give you some pointers.

none2none.fmw

 


ebygomm
Evangelist
Forum|alt.badge.img+51
  • Evangelist
  • January 24, 2017

This may work, but there is some question over rounding precision when using Pi (e.g.in the examples the delta doesn't exactly correspond to 3.14) and it assumes that there will only ever be one match

With the output looking like this


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 24, 2017

looks like points on reversed lines with a certain distance and sharing an ID. (parallel but reversed.)

That would mean, if it were exactly pi differing, that all points on the line have the same distance to the corresponding match.

So why not test for that.


femo
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • January 25, 2017

Hi @redgeographics, @gio and @egomm,

thank you very much for your support! Your hints inspired me and I am now there where I wanted to be. Since there are also situations where more than two Points

meet the above stated conditions I had to also add a sorting by distance and picking the smallest value (nearest distance).

Attached you find a screenshot of the snippet that does the job: