Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Let ST_Subdivide reselect pivot based on current piece geometry and not the original bbox. Split line for large polygons is also shifted to pass through existing point that lets the subdivision converge faster and chop off larger simple boxes.
This PR passes tests on simple cases.
One of unit tests (about inverted geometries) gets stuck on geos internals:
It does not create four extra points in case of simple split, but only three, saving one double precision grid snap on diagonal edges, so the polygon can be recombined back with higher precision.
For large polygons with detailed boundary it starts splitting off bigger central 4-point boxes than previously, not insisting on them being squares. After that a balanced pivot should be found in second, now smaller, part faster.
@@ Coverage Diff @@ ## svn-trunk #202 +/- ## ============================================= - Coverage 79.33% 79.33% -0.01% ============================================= Files 202 201 -1 Lines 63061 63004 -57 ============================================= - Hits 50032 49982 -50 + Misses 13029 13022 -7