Skip to main content
Solved

Splitting a polygon with another polygon


lambertus
Enthusiast
Forum|alt.badge.img+12

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
View original
Did this help you find an answer to your question?

4 replies

geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • 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+12
  • Author
  • Enthusiast
  • April 10, 2024
geomancer wrote:
  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+12
  • Author
  • Enthusiast
  • 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+34
  • Influencer
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings