Boost C++ Libraries: Ticket #9217: Impose closed rings of polygon in WKT output https://svn.boost.org/trac10/ticket/9217 <p> The <a class="ext-link" href="http://lists.boost.org/geometry/2013/10/2576.php"><span class="icon">​</span>problem with wkt io</a> thread reports: </p> <blockquote class="citation"> <p> 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 ? </p> </blockquote> <p> Here is a patch with attempt to correct this problem in the WKT streamer. </p> <p> It basically imposes last point to be equal to the first one, regardless if a polygon is modelled with closed or non-closed rings. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9217 Trac 1.4.3 Mateusz Loskot Wed, 09 Oct 2013 22:22:09 GMT attachment set https://svn.boost.org/trac10/ticket/9217 https://svn.boost.org/trac10/ticket/9217 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost-geometry-wkt-close-ring.patch</span> </li> </ul> <p> Patch to impose last point to be equal to the first one in WKT for polygons </p> Ticket Mateusz Loskot Wed, 09 Oct 2013 22:23:31 GMT summary changed https://svn.boost.org/trac10/ticket/9217#comment:1 https://svn.boost.org/trac10/ticket/9217#comment:1 <ul> <li><strong>summary</strong> <span class="trac-field-old">Ensure</span> → <span class="trac-field-new">Impose closed rings of polygon in WKT output</span> </li> </ul> Ticket Mateusz Loskot Wed, 09 Oct 2013 22:27:15 GMT attachment set https://svn.boost.org/trac10/ticket/9217 https://svn.boost.org/trac10/ticket/9217 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">close_polygon_wkt.cpp</span> </li> </ul> <p> Simple test to illustrate effects of the patch </p> Ticket Mateusz Loskot Thu, 10 Oct 2013 23:07:52 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9217#comment:2 https://svn.boost.org/trac10/ticket/9217#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Applied in trunk <a class="changeset" href="https://svn.boost.org/trac10/changeset/86233" title="[geometry] Impose closed rings of any polygon output in WKT (ticket #9217)">r86233</a> </p> Ticket