Solved

Linejoiner from angle tolerance

  • 26 April 2018
  • 2 replies
  • 11 views

Badge

Hi. I want to know if it's possible to use the 'linejoiner' tool by using an angle tolerance? For example, if I have 2 segments with an 'L' shape, I dont' want them to be joined together because they are 90° difference. But if my segments are less than 45° angle difference between each segment, I want them to be connected. Is there an easy way to do that? Thanks Frank.

icon

Best answer by takashi 27 April 2018, 01:11

View original

2 replies

Userlevel 2
Badge +17

Hi @fjoyal, summary of an idea.

  1. Find points where you don't want to connect lines according to the angle between adjacent two lines. The TopologyBuilder (Assume Clean Data: Yes) might help you to do this.
  2. Create tiny buffers of the points, and clip the original lines by them to cut off where the lines should not be connected.
  3. Apply the LineJoiner (called LineCombiner in the current version) to the shortened lines.
  4. Create buffers of the resulting lines (slender polygons. The buffer amount is small but should be greater than the buffers for the points).
  5. Use a Counter to add sequential number to the slender polygons as their unique ID.
  6. Use a SpatialFilter (Predicate: Filter Contains Candidate) to transfer the ID to the original lines.
  7. Apply the LineJoiner to the original lines grouping by ID.

[Addition] This screenshot illustrates my intention.

Badge

Thank you Takashi!

Reply