Skip to main content

Hi all,

I’m exploring a workaround to split a polygon based on a 70/30 area ratio:

  • 70% area → Type A
  • 30% area → Type B

Some visual explanation is included below.

The geometry of the split doesn’t need to follow a specific direction — any orientation is fine as long as the 70/30 ratio is maintained.

Has anyone come across a method or workaround to achieve this?

Thanks! 😊

The only thing that I can think of is an iterative approach.

E.g., Randomly pick a point inside the polygon, pick a random direction and then cut the polygon in two. compare areas and then progressively sweep the line through the polygon. At some point you should get pretty close. 

I played around with creating just 100 random lines though just a box and even this approach got me within half a percent every time. upping to 1000 random lines I was getting withing 0.05% consistently. The approach is pretty brute force but relatively simple.  Depending on how accurate you need the areas this might be an ok approach

 


Would a ‘donut’ split be acceptable?
As in you use a scaler and scale the area by 70% and then clip it with the original one, so you got 70% inner area and 30% outer ring.


Would a ‘donut’ split be acceptable?
As in you use a scaler and scale the area by 70% and then clip it with the original one, so you got 70% inner area and 30% outer ring.

Oh this is a nice approach!  


For convex polygons, the following approach works:

For a given x-value, you draw a vertical cutting line. Since the polygon is convex, this line divides the polygon into exactly two parts. This creates a continuous and monotonically increasing function p_x, which represents the percentage of the total polygon area on the left side of the line.

You choose two values, x_min and x_max, for which the corresponding percentages p_min and p_max (automatically: p_min < p_max). Then you can perform a binary search to find the value of x where p_x equals 70%.


Does the split have to be a straight line?


You could tile it, and then count the number of tiles and split based on that. SpatialSorter might be a useful transformer. 

The more tiles, the more accurate the split/nicer the line. You could also smooth/generalise the line to make it a bit nicer