Opened 9 years ago
Closed 9 years ago
#9217 closed Patches (fixed)
Impose closed rings of polygon in WKT output
| Reported by: | Mateusz Loskot | Owned by: | Mateusz Loskot |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | geometry |
| Version: | Boost Development Trunk | Severity: | Problem |
| Keywords: | geometry, wkt | Cc: |
Description
The problem with wkt io thread reports:
I am using read_wkt to read wkt polygons and wkt to convert them to string but i have some problems. I though that wkt polygons should have the last point equal to the first one ; however in my model polygons are not closed. The function read_wkt and wkt do not handle the last point, is this normal or did i missed something ?
Here is a patch with attempt to correct this problem in the WKT streamer.
It basically imposes last point to be equal to the first one, regardless if a polygon is modelled with closed or non-closed rings.
Attachments (2)
Change History (4)
by , 9 years ago
| Attachment: | boost-geometry-wkt-close-ring.patch added |
|---|
comment:1 by , 9 years ago
| Summary: | Ensure → Impose closed rings of polygon in WKT output |
|---|
by , 9 years ago
| Attachment: | close_polygon_wkt.cpp added |
|---|
Simple test to illustrate effects of the patch

Patch to impose last point to be equal to the first one in WKT for polygons