Solved

neighborfinder with staked locations


Morning all,

I have points (A) at the intersections of streets/lines. Also I have points (B) scattered everywhere. I need to keep location points A at intersections but would like to bring attribute information from points B. Point A can get all other points around it and stacked at this location.

icon

Best answer by markatsafe 9 March 2023, 21:03

View original

7 replies

Badge +2

@kris_ab​ You've identified the NeighborFinder transformer and that is the one to use. NeighborFinder adds the coordinates of the nearest Candidate as attributes so you can use the VertexCreator to replace the existing point geometry with the coordinates of A. Probably use B as the Base and A as the Candidate.

@kris_ab​ You've identified the NeighborFinder transformer and that is the one to use. NeighborFinder adds the coordinates of the nearest Candidate as attributes so you can use the VertexCreator to replace the existing point geometry with the coordinates of A. Probably use B as the Base and A as the Candidate.

thank you markatsafe, I will check that.

@kris_ab​ You've identified the NeighborFinder transformer and that is the one to use. NeighborFinder adds the coordinates of the nearest Candidate as attributes so you can use the VertexCreator to replace the existing point geometry with the coordinates of A. Probably use B as the Base and A as the Candidate.

imagered dots are vertex, I would like to get the information from blue dots into red dot based on the proximity. So the attributes can go from blue dots to red dots. SO, I can use red dots for my final products with the information from red dots. One red dot may have information from one blue dot or multiple blu dots. So, the red would be one on top of another. I tried to use neighborfinder but i only get one red dot has only one blue dot's attribute information. I must have one red dots have more than one blue dots.

imagered dots are vertex, I would like to get the information from blue dots into red dot based on the proximity. So the attributes can go from blue dots to red dots. SO, I can use red dots for my final products with the information from red dots. One red dot may have information from one blue dot or multiple blu dots. So, the red would be one on top of another. I tried to use neighborfinder but i only get one red dot has only one blue dot's attribute information. I must have one red dots have more than one blue dots.

imagethis is parameter for NeighborFinder transformer

image

Badge +2

@kris_ab​ Probably use B as the Base and A as the Candidate.

So in the example above, perhaps try using the output from the Chopper (A) as Candidate and Occurance (B) as the Base. Then add a VertexCreator to set _closest_candidate_x/y as the new point geometry (which should be the location of the intersection (A).

You're already using the AttributeAccumulation -Merge Attributes so your intersection Occurrance points should also have the Intersection attributes.

In your example above you are using Generate List, which will have all the nearest Occurrences (B) listed, but then you have to deal with that list, so reversing the Base/Candidate will make you life easier. So you can uncheck that.

I've attached an example workspace (FME 2022.2)

@kris_ab​ Probably use B as the Base and A as the Candidate.

So in the example above, perhaps try using the output from the Chopper (A) as Candidate and Occurance (B) as the Base. Then add a VertexCreator to set _closest_candidate_x/y as the new point geometry (which should be the location of the intersection (A).

You're already using the AttributeAccumulation -Merge Attributes so your intersection Occurrance points should also have the Intersection attributes.

In your example above you are using Generate List, which will have all the nearest Occurrences (B) listed, but then you have to deal with that list, so reversing the Base/Candidate will make you life easier. So you can uncheck that.

I've attached an example workspace (FME 2022.2)

Thank you very much. When I am done, I will post here.

Reply