123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef BOOST_GEOMETRY_STRATEGIES_CENTROID_SPHERICAL_HPP
- #define BOOST_GEOMETRY_STRATEGIES_CENTROID_SPHERICAL_HPP
- #include <boost/geometry/strategies/detail.hpp>
- #include <boost/geometry/strategies/centroid.hpp>
- #include <boost/geometry/strategies/centroid/services.hpp>
- namespace boost { namespace geometry
- {
- namespace strategies { namespace centroid
- {
- template
- <
- typename CalculationType = void
- >
- class spherical
- : public strategies::detail::spherical_base<void>
- {
- using base_t = strategies::detail::spherical_base<void>;
- public:
- spherical() = default;
-
- template <typename Geometry, typename Point>
- static auto centroid(Geometry const&, Point const&,
- std::enable_if_t
- <
- util::is_segment<Geometry>::value
- || util::is_box<Geometry>::value
- > * = nullptr)
- {
- return strategy::centroid::not_applicable_strategy();
- }
- };
- namespace services
- {
- template <typename Geometry>
- struct default_strategy<Geometry, spherical_equatorial_tag>
- {
- using type = strategies::centroid::spherical<>;
- };
- }
- }}
- }}
- #endif
|