ThinkGeo.com    |     Documentation    |     Premium Support

Split polygon in N number - equal areas

We have a scenario, where user needs to split the polygon/multipolygon in N equal number of polygons.
As I could not find any similar API to perform the split based on Area, I thought of two scenarios:

  1. Get Polygon center point, create lines emerging from the point, and create equal polygons.

  2. Draw horizontal or vertical lines, divide in equal parts.

Can you please provide me the approach to implement one/both with pros and cons if not already exists?

Hi Michel_Averseng,

We don’t have existing API for it, but if you have algorithm about that, I think you can complete the target via our API.

I have some thinking about it, the first solution you mentioned is not well, because it need to test all possible center point in the polygon, and you have to make sure all parts get same size at the same time.

The 2nd solution should be better, you can move a vertical line from left to right, and only calculate one part each time.

We have the area calculate API, but the loop logic need your custom code.

Wish the thinking is helpful.

Regards,

Ethan