Repository navigation
Centerline: return empty shape for too-simple polygons (fixes #7058) - #7562
loom-agent wants to merge 1 commit into
Conversation
msGEOSCenterline() aborted the entire map draw with a GEOS error when a polygon was too simple (e.g. convex or with few vertices) to produce a Voronoi-based centerline. Following the maintainer direction in #7058, skip the centerline for such features instead of throwing: return the already-empty line shape, which downstream callers and renderers handle via their existing numlines == 0 early-returns (msDrawShape, msDrawLineSymbol), and emit a debug message pointing at densify(). Input-validation failures (non-polygon input, negative densify tolerance) stay hard errors. Adds centerline6, a self-contained reproduction from the issue, and flips the existing centerline3 case from an expected exception to a rendered image.
|
@sdlime I used your square centerline layer (see below), and without this pull request of course gives the fatal error: and with this pull request, your square map image is generated correctly (without the centerline), with a debug message of
(Steve's test mapfile from #7058 : |
|
Hi, It looks like a new rule was introduced today, or perhaps we missed it yesterday: “Human-coordinated or uncoordinated (OpenClaw, etc.) use of agents for submission of contributions to the MapServer repository is banned.” Based on this rule, I’m closing this PR. We find this very disappointing. We understand that previous bad experiences with low-quality AI-generated code may have led to the rejection of our contributions, even though they were 100% human-supervised. We wish everyone the best. Have a nice day. |

Return an empty shape instead of an error when a polygon is too simple to
compute a centerline (no densified points, or no Voronoi path).
Fixes #7058
(see #7560 for chatty PR description)