File indexing completed on 2025-09-18 08:44:42
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_GEOMETRY_STRATEGIES_CENTROID_SPHERICAL_HPP
0013 #define BOOST_GEOMETRY_STRATEGIES_CENTROID_SPHERICAL_HPP
0014
0015
0016 #include <boost/geometry/strategies/detail.hpp>
0017 #include <boost/geometry/strategies/centroid.hpp>
0018 #include <boost/geometry/strategies/centroid/services.hpp>
0019
0020
0021 namespace boost { namespace geometry
0022 {
0023
0024 namespace strategies { namespace centroid
0025 {
0026
0027 #ifndef DOXYGEN_NO_DETAIL
0028 namespace detail
0029 {
0030
0031 class spherical
0032 {
0033 public:
0034
0035 template <typename Geometry, typename Point>
0036 static auto centroid(Geometry const&, Point const&,
0037 std::enable_if_t
0038 <
0039 util::is_segment<Geometry>::value
0040 || util::is_box<Geometry>::value
0041 > * = nullptr)
0042 {
0043 return strategy::centroid::not_applicable_strategy();
0044 }
0045 };
0046
0047
0048 }
0049 #endif
0050
0051
0052 template <typename CalculationType = void>
0053 class spherical
0054 : public strategies::detail::spherical_base<void>
0055 , public strategies::centroid::detail::spherical
0056 {
0057 public:
0058 spherical() = default;
0059 };
0060
0061
0062 namespace services
0063 {
0064
0065 template <typename Geometry>
0066 struct default_strategy<Geometry, spherical_equatorial_tag>
0067 {
0068 using type = strategies::centroid::spherical<>;
0069 };
0070
0071 }
0072
0073 }}
0074
0075 }}
0076
0077 #endif