Skip to main content

Hello,

unfortunately I do not know how to solve the following problem. I have many points and lines and would like to create a connection to the line layer for the points. The lines should not be drawn directly to the starting lines as in the second case, but an iteration should take place. Here is the process as I would describe it:

1. a point is taken and the closest point to the line layer is determined and this line is also created

2. the new line is added to the existing line layer

3. the next point is taken and the closest point to the line layer is determined. The new line layer may result in a shorter route than the original layer.

4. the new line is added back to the original data set, etc.

So far I have tried various workflows with a loop, but unfortunately I have not gotten very far.

 

I would be very grateful for any ideas and suggestions.

@connecter interesting case. I have the feeling that the points shown below with the red circles is the most challenging part:

 

It would nice to exclude them when your NeigbhourFinder + VertexCreator run. Is that possible?
If so, than you could include these challenge points in a second run and then connect them to the already created blue lines as you showed in the Goal image.


Hi ​@lambertus and thank you for your answer. The area shown is of course only an example and there are many more points. What makes it particularly difficult, of course, is that it depends very much on which point is taken first and which is taken last. 
If, for example, a point further south towards the route had been taken first, the result would look like this:


But that's okay, the main thing is that not all of them are simply connected to the start line layer.


@connecter thanks for your reply, I have an idea how this could be solved. Will make some sample data and build a workspace. I will keep you posted.


Considering 2 cases seems to be the great way, simple line with a unique point and “complex ones” with several points. Your “complex geometry is based on a simple line (in blue) in which other points are connected to. If you choose the highest point (in red) you will have the line that have to be connected to other points (in green), but if the configuration is not always like this, it’s probably something else.

 


A possible starting point would be to create perpendicular ‘segments’ (polygons) that extend out from line. You can then use these to ‘group’ the points. In each group, you can then figure out which point is furthest, and use that for the ‘trunk’ line. Then for each other point in the group determine if you want to snap that ‘trunk’ to the vertex, or add a branch connecting the point to the branch.

If I have some time later in the day/week, I can expand a bit on this


Reply