Question

Build lines - connection break by distance

  • 16 November 2018
  • 3 replies
  • 7 views

Badge

Hi, I have a big csv file with points that I want to transform to lines. The Linebuilder works fine when you have attribute that controls when to build a new line. But what is the approach if I want to start a new line when the next point is far away?


3 replies

Userlevel 2
Badge +17

If I understood your requirement correctly, a possible way is:

  1. LineBuilder: Connect every point to form a single polyline.
  2. Chopper (Mode: By Vertex, Maximum Vertices: 2): Decompose the line into individucal segments.
  3. LengthCalculator (or @Length function) and Tester: Keep only segments whose lengths are shorter than a certain distance.
  4. LineCombiner: Combine the kept segments to form polylines separated by the spaces where there had been the discarded longer segments.
Badge +3

@hrinze

Calculate the distance and set an (incrementing) attribute value ('breakvalue" attribute) if it is beyond the limit you require (conditional creator in attribute creator).

Easiest way to create incrementing value that is to use adjacent feature in attribuite creator.

Then use this "breakvalue" column as breakvalue.

Badge

If I understood your requirement correctly, a possible way is:

  1. LineBuilder: Connect every point to form a single polyline.
  2. Chopper (Mode: By Vertex, Maximum Vertices: 2): Decompose the line into individucal segments.
  3. LengthCalculator (or @Length function) and Tester: Keep only segments whose lengths are shorter than a certain distance.
  4. LineCombiner: Combine the kept segments to form polylines separated by the spaces where there had been the discarded longer segments.

This is a fantastic answer, thank you!

Reply