I have polylines and polygons as separate source data. A polyline that has an end in a polygon must be clipped with a polygon, leaving only part outside the polygon. At the same time, the lines thats intersects the polygons must remain unchanged.
How to filter lines with endpoints in polygons for clipping and keeping only line segments outside polygons?
Hi @is you can use the clipper and choose the clipper and the lines outside the polygons will be output from the "Outside" port
For the lines that intersect the polygons you can use the LineOnAreaOverlayer transformer to know which ones touch the polygons. You could use the SpatialFilter as well, but I prefer the first one.
I upload a picture - only red parts of polylines must be removed.
I upload a picture - only red parts of polylines must be removed.
I would use a pattern matrix to determine which lines start/end within the polygon, then use that as a basis to group by in the clipper. If you have lines that start and end in different polygons, you then need to combine the clipped output so that only the portion of the line outside polygons is retained.
I would use a pattern matrix to determine which lines start/end within the polygon, then use that as a basis to group by in the clipper. If you have lines that start and end in different polygons, you then need to combine the clipped output so that only the portion of the line outside polygons is retained.
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.