jiayuasu opened a new pull request, #3285: URL: https://github.com/apache/sedona/pull/3285
## Did you read the Contributor Guide? - [x] Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/) ## Is this PR related to a ticket? - [x] Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #3276 ## What changes were proposed in this PR? Polygons with many short, near-collinear edges (outlines traced from raster pixels, `ST_SubDivide` pieces) trigger degenerate collision events inside campskeleton. The library caught the resulting `java.lang.Error: Planes do not intersect at a single point` internally and printed the full stack trace to stderr for every event: 130-190 traces per call for the 557-vertex polygon in the issue, hundreds of thousands for a job over a few thousand polygons. The call still returned a result, so nothing signalled a problem except the log volume. This bumps campskeleton to `0.0.2-20260823` (jiayuasu/campskeleton#3), which fixes this at the source: - The known degenerate condition is now a dedicated `SingularPlanesError` logged via `java.util.logging` at FINE level (silent by default, can be enabled for debugging). - Any other unexpected failure during event processing still logs at WARNING with its stack trace, so real problems remain visible. - The algorithm is unchanged: the degenerate event is skipped exactly as in every previous release. Restoring the pre-fork RuntimeException semantics (which would re-enable the library's parallel-edge fallbacks) was evaluated and rejected because it measurably degraded skeletons on rasterised outlines (edges far outside the input polygon, crossing arcs). Also adds a note to the `ST_StraightSkeleton` / `ST_ApproximateMedialAxis` doc pages (sql, flink, snowflake) that such inputs should be simplified first, e.g. with `ST_SimplifyPreserveTopology`, since the skeleton quality around near-collinear edges is degraded regardless of logging. ## How was this patch tested? - New regression test `StraightSkeletonTest#rasterizedOutlineWritesNothingToStderr`: runs `ST_StraightSkeleton` and `ST_ApproximateMedialAxis` on the 557-vertex repro polygon from the issue (added as a test resource) with `System.err` captured, and asserts nothing is written while both calls still produce non-empty results. The test fails against campskeleton `0.0.2-20260118` and passes with `0.0.2-20260823`. - Full `StraightSkeletonTest` suite (24/24) passes with the dependency resolved fresh from Maven Central. - Output parity was checked over repeated runs on the repro polygon and a 30-polygon rasterised-outline benchmark: edge counts and total lengths match the previous release run-for-run, and stderr stays at 0 bytes (with and without `-ea`). ## Did this PR include necessary documentation updates? - [x] Yes, I have updated the documentation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
