fix(Polygon_repair): Ensure WKT POLYGON are closed (#9148)

## Summary of Changes

Fix WKT polygon definitions to comply with OGC standards

  ### Problem
Several WKT files contained invalid polygon definitions where the first
and last coordinates did not match, violating the OGC Simple Features
specification, which requires polygon rings to be closed.

This caused errors when attempting to read these files with other
libraries like SFCGAL, even though CGAL's WKT method handles unclosed
polygons gracefully.

  ### Changes
- **examples/Polygon_repair/data/winding.wkt**: Added closing point (0
0)
  - **examples/Polygon_repair/data/flat.wkt**: Closed all 4 polygons
- **test/Polygon_repair/data/in/overlapping-edge-inside.wkt**: Closed
second polygon in MULTIPOLYGON

  ### Notes
- `test/Polygon_repair/data/in/not-closed.wkt` was intentionally left
unclosed as it serves as a test case for the repair algorithm
- These changes do not affect CGAL's test results, as the repair
algorithm produces identical output for both closed and unclosed input

## Release Management

* Affected package(s):
* Issue(s) solved (if any): fix #0000, fix #0000,...
* Feature/Small Feature (if any):
* Link to compiled documentation (obligatory for small feature) [*wrong
link name to be changed*](httpssss://wrong_URL_to_be_changed/Manual/Pkg)
* License and copyright ownership:
This commit is contained in:
Sebastien Loriot 2025-12-03 11:37:47 +01:00 committed by GitHub
commit 06996f077f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
POLYGON((0 0, 40 0, 40 40, 0 40))
POLYGON((10 10 , 30 10, 30 30, 0 30))
POLYGON((1 1, 2 1, 2 2, 1 2))
POLYGON((11 11, 12 11, 12 12, 11 12))
POLYGON((0 0, 40 0, 40 40, 0 40, 0 0))
POLYGON((10 10 , 30 10, 30 30, 0 30, 10 10))
POLYGON((1 1, 2 1, 2 2, 1 2, 1 1))
POLYGON((11 11, 12 11, 12 12, 11 12, 11 11))

View File

@ -1 +1 @@
POLYGON((0 0, 10 0, 10 6, 6 6, 6 4 , 10 4, 10 10, 0 10))
POLYGON((0 0, 10 0, 10 6, 6 6, 6 4 , 10 4, 10 10, 0 10, 0 0))

View File

@ -1 +1 @@
MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0)),((1 0.25,2 0.25,2 0.75,1 0.75,1 0)))
MULTIPOLYGON(((0 0,1 0,1 1,0 1,0 0)),((1 0.25,2 0.25,2 0.75,1 0.75,1 0.25)))