#include
#include
#include
void test_point_on_surface()
{
typedef boost::geometry::model::point 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
}