Skip to main content
Solved

Splitting a polygon with another polygon

  • April 10, 2024
  • 4 replies
  • 294 views

lambertus
Enthusiast
Forum|alt.badge.img+23

My goal is to split the green polygon at the edge of the pink polygon. However, the pink one is not aligned properly. The black line indicates the cutting line I want to achieve. 

I am thinking of creating a buffer around the pink dataset, however only at the top and bottom border. At the left side, where the cutting line is present, a buffer is not allowed. When such a buffer is created I could use an Intersector probably to split the green polygon. Any support is appreciated!

 

Best answer by geomancer

  1. Convert the pink polygon into lines with a Chopper
  2. Entend these lines with a LineExtender
  3. Use an Intersector to intersect all objects (the green polygon and the lines from the pink polygon)
  4. Build polygons with an AreaBuilder
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.

4 replies

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • Best Answer
  • April 10, 2024
  1. Convert the pink polygon into lines with a Chopper
  2. Entend these lines with a LineExtender
  3. Use an Intersector to intersect all objects (the green polygon and the lines from the pink polygon)
  4. Build polygons with an AreaBuilder

lambertus
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 141 replies
  • April 10, 2024
  1. Convert the pink polygon into lines with a Chopper
  2. Entend these lines with a LineExtender
  3. Use an Intersector to intersect all objects (the green polygon and the lines from the pink polygon)
  4. Build polygons with an AreaBuilder

Thanks @geomancer !  Sounds like a good solution, will give it a try tomorrow :)


lambertus
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 141 replies
  • April 11, 2024

@geomancer the solution worked almost fine. I am only struggling now with the AreaBuilder. 

When I can combine everyting of the Intersector into Areas I get this. Thats almost fine. But now I need a trick to select the left part only. Any idea? :) 


 

 


liamfez
Influencer
Forum|alt.badge.img+43
  • Influencer
  • 278 replies
  • April 11, 2024

If the parts you want (in this case the left part) are the ones where the original pink polygon isn’t, you could run your current results through a spatial filter. Perhaps replacing the pink geometry with its centroid, and then filtering for the new geometry which does not contain the pink geometries centroid. The exact method would depend on your use case, but that is a general idea of how you could arrive at the best solution.