Solved

How to find closet point at same small polygon

  • 26 January 2023
  • 3 replies
  • 1 view

Badge +13

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

icon

Best answer by redgeographics 27 January 2023, 07:14

View original

3 replies

Userlevel 4
Badge +25

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.

Badge +13

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 .

Userlevel 4
Badge +25

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.

Reply