Re: [Boost-bugs] [Boost C++ Libraries] #9244: Respect rings closure of polygon while reading WKB/WKT input (was: Respect rings closure of polygon while reading WKT input)

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9244: Respect rings closure of polygon while reading WKB/WKT input (was: Respect rings closure of polygon while reading WKT input)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-14 15:33:07


#9244: Respect rings closure of polygon while reading WKB/WKT input
--------------------------------------+----------------------
  Reporter: mloskot | Owner: mloskot
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: geometry
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords: wkt,wkb
--------------------------------------+----------------------
Changes (by mloskot):

 * keywords: => wkt,wkb


Old description:

> This task is reverse of #9217.
>
> If model of a polygon specifies non-closed rings (first point is not
> repeated at last position), then this specification should be respected
> while consuming polygon encoded in OGC WKT format in which all rings are
> always closed.
>
> For example, the point number assertion below should hold:
>
> {{{
> using namespace boost::geometry;
>
> typedef model::point< double, 2, boost::geometry::cs::cartesian > Point;
> typedef model::polygon< Point, false, false > Polygon;
>
> Polygon p;
> read_wkt("POLYGON((1 1, 5 1, 5 5, 1 5, 1 1))", p);
>
> assert(p.outer().size() == 4);
> }}}

New description:

 This task is reverse of #9217.

 If model of a polygon specifies non-closed rings (first point is not
 repeated at last position), then this specification should be respected
 while consuming polygon encoded in OGC WKT format in which all rings are
 always closed.

 For example, the point number assertion below should hold:

 {{{
 using namespace boost::geometry;

 typedef model::point< double, 2, boost::geometry::cs::cartesian > Point;
 typedef model::polygon< Point, false, false > Polygon;

 Polygon p;
 read_wkt("POLYGON((1 1, 5 1, 5 5, 1 5, 1 1))", p);

 assert(p.outer().size() == 4);
 }}}

 The above applies to WKB I/O as well.

--
-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9244#comment:1>
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:14 UTC