Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Geometry, probable bug in point_on_surface
From: Petr Doubrava (petr_at_[hidden])
Date: 2014-10-10 04:32:24


Hi Adam,

thank for your answer. I have created a ticket:
 
https://svn.boost.org/trac/boost/ticket/10643

Regards,
Petr

----- Original Message -----
From: Adam Wulkiewicz
[mailto:adam.wulkiewicz_at_[hidden]]
To: boost-users_at_[hidden]
Sent:
Thu, 09 Oct 2014 16:44:04 +0100
Subject: Re: [Boost-users] Boost.Geometry,
probable bug in point_on_surface

> Hi Petr,
>
> I'll top-post because there is only code below.
>
> You're right, something's wrong with point_on_surface().
> Could you please create a ticket:
> http://www.boost.org/development/bugs.html ?
>
> FYI, your WKT POLYGON is CCW but you're creating a CW one using default
> template parameters of model::polygon<>.
>
> Regards,
> Adam
>
> Petr Doubrava wrote:
> > #include <boost/geometry.hpp>
> > #include <boost/geometry/geometries/point_xy.hpp>
> > #include <boost/geometry/geometries/polygon.hpp>
> >
> > 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);
> > // res is false
> > }
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net