Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10643: point_on_surface bug, computed point isn't on the surface of polygon
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-10-10 08:27:41
#10643: point_on_surface bug, computed point isn't on the surface of polygon
-------------------------------+---------------------------
Reporter: petr@⦠| Owner: barendgehrels
Type: Bugs | Status: new
Milestone: To Be Determined | Component: geometry
Version: Boost 1.56.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+---------------------------
Comment (by petr@â¦):
I do not have permission to add attachments. Code is below in this
comment.
{{{
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <assert.h>
void test_point_on_surface()
{
typedef boost::geometry::model::point<double, 2,
boost::geometry::cs::cartesian> Point;
boost::geometry::model::polygon<Point> poly;
boost::geometry::read_wkt("POLYGON((1074699.93 703064.65, 1074702.10
703054.62, 1074704.53 703061.40, 1074703.90 703064.58, 1074699.93
703064.65))",poly);
boost::geometry::correct(poly);
Point point;
boost::geometry::point_on_surface(poly,point);
//computed point isn't on the surface of polygon
//[0] 1074839.1013086310 double
//[1] 703154.77900308778 double
bool res = boost::geometry::within(point,poly);
assert(res==true);
// res is false :-(
}
int main(int argc, char* argv[])
{
test_point_on_surface();
return 0;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10643#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:17 UTC