Skip to main content
Question

Build lines - connection break by distance

  • November 16, 2018
  • 3 replies
  • 35 views

Forum|alt.badge.img

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

takashi
Contributor
Forum|alt.badge.img+21
  • Contributor
  • November 16, 2018

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.

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • November 16, 2018

@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.


evanedwards
Forum|alt.badge.img+1
takashi wrote:

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings