-
In PGS, I offer a "maximum inscribed" circle packing method, which packs a polygon with the N largest non-overlapping inscribed circles, relying on JTS'
This is a fairly slow method 1) because it looks like the JTS implementation uses grid-based indexing approach and I wonder whether the following is feasible way to optimise this operation: after the initial MIC is found on the geometry's indexed grid cells, we remove any grid cells that our MIC covers, then simply run the sub-routine that finds the MIC on the remaining grid cells, and repeat this N times. I suspect the most involved part would be refining/sub-dividing any grid cells the previous MIC partially overlaps to get a more circular cut-out when we remove them. Cell distances would need updating too after each iteration -- could this simply be |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
As you point out, the need to reconcile the resolution of the grid with the circular constraint(s) feels awkward. I would try and approach of maintaining the removed circles as purely vector constraints (at full accuracy, by representing them as a center point and a radius). The cell distances can be computed based on the original input points/polygon, in combination with the removed circles. |
Beta Was this translation helpful? Give feedback.
-
Looks great! |
Beta Was this translation helpful? Give feedback.
As you point out, the need to reconcile the resolution of the grid with the circular constraint(s) feels awkward. I would try and approach of maintaining the removed circles as purely vector constraints (at full accuracy, by representing them as a center point and a radius). The cell distances can be computed based on the original input points/polygon, in combination with the removed circles.