Re: [Boost-bugs] [Boost C++ Libraries] #9206: intersection of non-closed polygons returns closed polygon

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9206: intersection of non-closed polygons returns closed polygon
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-01 12:01:58


#9206: intersection of non-closed polygons returns closed polygon
-------------------------------------+-------------------------------------
  Reporter: Volker Schöch | Owner: barendgehrels
  <volker@…> | Status: new
      Type: Bugs | Component: geometry
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.55.0 | Keywords: intersection, multi-
Resolution: | polygon, polygon, closed, open,
                                     | correct
-------------------------------------+-------------------------------------

Comment (by mkaravel):

 I have attached my own stand-alone test program.

 First of all I am checking whether the two polygons are valid (new
 functionality in develop branch and soon in boost 1.56). As you can see
 the second polygon is reported as invalid. Indeed it is supposed to be
 counter-clockwise and open, but it is given as clockwise and open.

 So after I correct this polygon, I run intersects and display the output
 in WKT format and using boost::geometry::dsv. I also print the number of
 points of the output polygon. As you can see, the WKT output "closes" the
 polygon. This behavior is new in the develop branch and in the upcoming
 boost 1.56 release: the WKT description of a polygon always reports the
 polygon as if it were closed. On the other hand the dsv output displays
 the polygon as open, which is also in sync with what num_points reports: 5
 points. So the resulting polygon (at least with my program) is still open,
 but in order to see that you cannot rely on the WKT output.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9206#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC