Skip to main content
Solved

Linejoiner from angle tolerance

  • April 26, 2018
  • 2 replies
  • 76 views

Forum|alt.badge.img

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.

Best answer by takashi

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • April 26, 2018

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.


Forum|alt.badge.img
  • Author
  • 5 replies
  • April 27, 2018

Thank you Takashi!