Skip to main content

Is it possible to split 1 polygon equally into 5 sub polygons based on point density and not area?

 

For Example there is 100,000 points inside a polygon and I would like to split the polygon into 5 parts each part containing ~20,000 points (it doesn't need to be exactly 20,000 but the points need to be spatially in the same area).

 

 

There is the PointCloudDensityTiler custom transformer which in a round about way does the same thing (add it to your workspace and edit it to see how it works).

 

Essentialyl what you'll need to do is calculate the number of points in your polygon (PointOnAreaOverlayer). When there is more than your target, split the polygon into two, then repeat until all your tiles are within your specified bounds. This will need to be a looping custom transformer.

 

This method may result in four polygons have 20,000 points, one having 19,999 and one having One point. You'll want to do some further processing to merge the poly with One point to one of the others.


Reply