spherical.hpp 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Boost.Geometry
  2. // Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
  3. // Copyright (c) 2020-2021, Oracle and/or its affiliates.
  4. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  5. // Licensed under the Boost Software License version 1.0.
  6. // http://www.boost.org/users/license.html
  7. #ifndef BOOST_GEOMETRY_STRATEGIES_SPHERICAL_HPP
  8. #define BOOST_GEOMETRY_STRATEGIES_SPHERICAL_HPP
  9. #include <boost/geometry/strategies/area/spherical.hpp>
  10. #include <boost/geometry/strategies/azimuth/spherical.hpp>
  11. #include <boost/geometry/strategies/buffer/spherical.hpp>
  12. #include <boost/geometry/strategies/centroid/spherical.hpp>
  13. #include <boost/geometry/strategies/closest_points/spherical.hpp>
  14. #include <boost/geometry/strategies/convex_hull/spherical.hpp>
  15. #include <boost/geometry/strategies/distance/spherical.hpp>
  16. #include <boost/geometry/strategies/envelope/spherical.hpp>
  17. #include <boost/geometry/strategies/expand/spherical.hpp>
  18. #include <boost/geometry/strategies/io/spherical.hpp>
  19. #include <boost/geometry/strategies/index/spherical.hpp>
  20. #include <boost/geometry/strategies/is_convex/spherical.hpp>
  21. #include <boost/geometry/strategies/relate/spherical.hpp>
  22. #include <boost/geometry/strategies/simplify/spherical.hpp>
  23. namespace boost { namespace geometry
  24. {
  25. namespace strategies
  26. {
  27. template
  28. <
  29. typename RadiusTypeOrSphere = double,
  30. typename CalculationType = void
  31. >
  32. class spherical
  33. // derived from the umbrella strategy defining the most strategies
  34. : public strategies::closest_points::spherical<RadiusTypeOrSphere, CalculationType>
  35. , public strategies::centroid::detail::spherical
  36. {
  37. using base_t = strategies::closest_points::spherical<RadiusTypeOrSphere, CalculationType>;
  38. public:
  39. spherical() = default;
  40. template <typename RadiusOrSphere>
  41. explicit spherical(RadiusOrSphere const& radius_or_sphere)
  42. : base_t(radius_or_sphere)
  43. {}
  44. static auto azimuth()
  45. {
  46. return strategy::azimuth::spherical<CalculationType>();
  47. }
  48. static auto point_order()
  49. {
  50. return strategy::point_order::spherical<CalculationType>();
  51. }
  52. };
  53. } // namespace strategies
  54. }} // namespace boost::geometry
  55. #endif // BOOST_GEOMETRY_STRATEGIES_SPHERICAL_HPP