Skip to main content

I need to create lines between points. I had seen an article for similar in a different post saying a PointConnector was the way to go (Draw lines between points (safe.com)) but when I try to insert the PointConnector it puts in a LineBuilder which doesn't work. I need the end result to be something similar to the screenshot below where an individual line is drawn between every single point. How can I do this?

 

image

Hi @gmbutler2​,

The NeighborFinder transformer can help you do this:

Screen Shot 2023-04-28 at 2.52.51 PMSet the NeighborFinder up as follows:

Screen Shot 2023-04-28 at 2.49.16 PMThis will create a list on each point containing the location of all the other points in the dataset. Explode this list into individual features, then use a VertexCreator to add a second point from the attributes containing the location of the other point, forming a line. You will end up with two lines between any two points, one in each direction. Filter these lines (if desired) using a Matcher transformer with lenient geometry matching to get a single line between any two points.


Reply