Skip to main content
Solved

How to find closet point at same small polygon

  • January 26, 2023
  • 3 replies
  • 21 views

gogopotter90
Contributor
Forum|alt.badge.img+14

I have too many points A and too many points B and I have many small polygons .

 

every small polygons contain point A but some of them include point B .

 

i would like to to find each point B that close to point A but it should be at the same small polygon

if point A does not find point B ,at same small polygon so it will be better if i can mark it .that no point B close to point A .

FME 2021

Thanks in advance

Best answer by redgeographics

Thanks but why should I use group by in neighbour finder ,only to understand more .

The group by is to make sure that points from set A will only consider points from set B as potential neighbors if they have same polygon id value, i.e. if they are within the same polygon.

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.

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • January 26, 2023

On a question like this it would be very helpful to see a small sample of the data.

 

Assuming the polygons have an id attribute (and if they don't you can use a Counter to create that)

 

First a PointOnAreaOverlayer for both points A and B to assign the id of the polygon(s) to the points, then a NeighborFinder with a group by on the polygon id.


gogopotter90
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • 239 replies
  • January 26, 2023

On a question like this it would be very helpful to see a small sample of the data.

 

Assuming the polygons have an id attribute (and if they don't you can use a Counter to create that)

 

First a PointOnAreaOverlayer for both points A and B to assign the id of the polygon(s) to the points, then a NeighborFinder with a group by on the polygon id.

Thanks but why should I use group by in neighbour finder ,only to understand more .


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3699 replies
  • Best Answer
  • January 27, 2023

Thanks but why should I use group by in neighbour finder ,only to understand more .

The group by is to make sure that points from set A will only consider points from set B as potential neighbors if they have same polygon id value, i.e. if they are within the same polygon.