Skip to main content
Question

Lines that touching multiple polygons

  • October 24, 2016
  • 3 replies
  • 61 views

Hello, I have a question about using line transformers. I have lines and polygons. Some lines are touching polygons at both ends, some lines are touching 1 polygon at 1 end. Some lines are touching no polygons. How can I determine the lines who touching the polygons at both ends?

Kind regards,

Steven Loosman

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.

3 replies

Forum|alt.badge.img+1
  • October 24, 2016

If you use a SpatialRelator, with your lines as the requestor and the polygons as the supplier, you can use the related candidates-parameter (should be 2).

If there is a risk of intersections other points of the line too, use a snipper with (5%,95%) and perform the same process on the first and last snippet of the line. Then aggregate and sum the related candidates.


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • October 24, 2016

Alternatively you can extract the start and end points of each line using a coordinate extractor (0 for start of line -1 for end of line), create points and perform a spatial test using spatial relator to see if the point touches a polygon. Aggregate the results based on an id for the line feature summing the related candidates and only those lines that have related candidates of 2 touch a polygon at both ends


I tried the SpatialRelator and it works. Thanks for the answers.