Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10823: IsValid or dissolve problem?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-24 09:52:19
#10823: IsValid or dissolve problem?
-------------------------------+---------------------------
Reporter: anonymous | Owner: barendgehrels
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: geometry
Version: Boost 1.57.0 | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------+---------------------------
Changes (by mkaravel):
* status: new => closed
* resolution: => wontfix
Comment:
Hi Johan.
According to the OGC standard the outer and inner rings of a polygon must
be simple rings (the standard uses the term "LinearRing" for this). As
such, a ring of a polygon cannot touch itself.
This is what is implemented in Boost.Geometry (a bit relaxed though as we
do allow for duplicate consecutive points). For your polygon to be valid,
you need to define the inner ring separately; see the following WKT:
POLYGON((0 3,3 3,3 1,2 1,2 0,0 0,0 3),(2 1,2 2,1 2,1 1,2 1))
I have also attached a small program exhibiting what I am claiming above;
if you re-define your polygon as per the WKT above, it is detected as
valid.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10823#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:18 UTC