Skip to main content

Is there a possibility to use group by on a NeighbourhoodPairFinder? I would like to find two closest points to a point (in the same file) and get the resulting lines to combine (in a effort to draw lines through a set of points).

 

The points are on either side of a road and they must not crisscross. I do not want to use the road centerline file (as spatial filter). I have an attribute (side of road) and would like to find the points based on this group by however, the NeighborhoodPaitFinder does not have this. Only the NeighborFinder has this.

You can put the NeighbourhoodPairFinder inside a CustomTransformer, the CustomTransformer can process by group. https://community.safe.com/s/article/parallel-processing-using-custom-transformers

The article is about parallel processing, however, you don't need to make it parallel, just use the group functionality


@sraapril​ can you get NeighborFinder to work for you - perhaps with Number of Neighbors to Find = 2? NeighbourFinder has a Group By


@sraapril​ can you get NeighborFinder to work for you - perhaps with Number of Neighbors to Find = 2? NeighbourFinder has a Group By

Unfortunately, I have to find two closest points and not one 😞 I tried already


You can put the NeighbourhoodPairFinder inside a CustomTransformer, the CustomTransformer can process by group. https://community.safe.com/s/article/parallel-processing-using-custom-transformers

The article is about parallel processing, however, you don't need to make it parallel, just use the group functionality

Thank you, but this did not work for me. I get to option to GroupBy. I put just the neighbourhoodPairFinder in a custom transformer and I get the same configurations as that of the original transformer. Despite adding it with others, it becomes an aggregate of the rest. Adding a transformer with GroupBy also does not give me the desired results.


Reply