Question

Draw line through points: Grouping for NeighborhoodPairFinder


Badge

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.


4 replies

Userlevel 4
Badge +26

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

Badge +2

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

Badge

@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

Badge

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