diff --git a/test/algorithms/convex_hull/convex_hull_sph_geo.cpp b/test/algorithms/convex_hull/convex_hull_sph_geo.cpp index 33dfef803..277c3ae8c 100644 --- a/test/algorithms/convex_hull/convex_hull_sph_geo.cpp +++ b/test/algorithms/convex_hull/convex_hull_sph_geo.cpp @@ -52,6 +52,14 @@ void test_all() >("polygon((1 1, 1 4, 3 4, 3 3, 4 3, 4 4, 5 4, 5 1, 1 1))", 9, 5, 0.003652987070377825, 147615606532.65408); + // calculate convex hull with a non-default spherical side strategy + test_geometry + < + bg::model::polygon, + sphrerical_side_by_cross_track<> + >("polygon((359 0,1 1,1 -1,359 0))", 4, 4, + 0.00060931217091786914); + test_empty_input>(); test_empty_input>(); test_empty_input>(); diff --git a/test/algorithms/convex_hull/test_convex_hull.hpp b/test/algorithms/convex_hull/test_convex_hull.hpp index b7912075b..df1b959b0 100644 --- a/test/algorithms/convex_hull/test_convex_hull.hpp +++ b/test/algorithms/convex_hull/test_convex_hull.hpp @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -62,6 +63,15 @@ struct non_robust_cartesian_sbt : boost::geometry::strategies::detail::cartesian } }; +template +struct sphrerical_side_by_cross_track : boost::geometry::strategies::detail::spherical_base +{ + static auto side() + { + return boost::geometry::strategy::side::side_by_cross_track<>(); + } +}; + struct precise_cartesian : boost::geometry::strategies::detail::cartesian_base { template @@ -318,6 +328,7 @@ void test_geometry_sph_geo(std::string const& wkt, size_hull_closed, geographic_expected_area); } + template void test_empty_input() {