id summary reporter owner description type status milestone component version severity resolution keywords cc 10562 Wrong number of Points returned by convex_hull() awulkiew Barend Gehrels "If a valid Polygon is generated by a convex_hull() function, the Points of a closed Polygon are always returned (duplicated first Point at the end of a Range), even if an open Polygon is passed as the output. Example: {{{ namespace bg = boost::geometry; typedef bg::model::point point; typedef bg::model::polygon polygon; typedef bg::model::polygon polygon_closed; typedef bg::model::multi_point multi_point; multi_point mp; bg::append(mp, point(1, 1)); bg::append(mp, point(2, 2)); bg::append(mp, point(2, 1)); bg::append(mp, point(1, 2)); polygon res; polygon_closed res_c; bg::convex_hull(mp, res); std::cout << bg::closure::value << std::endl; std::cout << res.outer().size() << std::endl; std::cout << bg::wkt(res) << std::endl; bg::convex_hull(mp, res_c); std::cout << bg::closure::value << std::endl; std::cout << res_c.outer().size() << std::endl; std::cout << bg::wkt(res_c) << std::endl; }}} Output: {{{ 0 5 POLYGON((1 1,1 2,2 2,2 1,1 1)) 1 5 POLYGON((1 1,1 2,2 2,2 1,1 1)) }}} On the other hand when an invalid Polygon is generated, a convex hull of a 1-Point MultiPoint or 2-Point Linestring always 3-Point Polygon is generated. The smallest number of Points of a valid, closed Polygon should be 4. The generated Polygon isn't valid but the number of Points could be consistent. Example: {{{ multi_point mp; bg::append(mp, point(1, 1)); }}} Output: {{{ 0 3 POLYGON((1 1,1 1,1 1)) }}} Example: {{{ multi_point mp; bg::append(mp, point(1, 1)); bg::append(mp, point(2, 2)); }}} Output: {{{ 0 3 POLYGON((1 1,2 2,1 1)) }}}" Bugs closed Boost 1.57.0 geometry Boost Development Trunk Problem fixed convex_hull