spherical.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Boost.Geometry
  2. // Copyright (c) 2021, Oracle and/or its affiliates.
  3. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  4. // Licensed under the Boost Software License version 1.0.
  5. // http://www.boost.org/users/license.html
  6. #ifndef BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SPHERICAL_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SPHERICAL_HPP
  8. // TODO: move this file to boost/geometry/strategy
  9. #include <boost/geometry/strategies/spherical/azimuth.hpp>
  10. #include <boost/geometry/strategies/azimuth/services.hpp>
  11. #include <boost/geometry/strategies/detail.hpp>
  12. namespace boost { namespace geometry
  13. {
  14. namespace strategies { namespace azimuth
  15. {
  16. template <typename CalculationType = void>
  17. class spherical : strategies::detail::spherical_base<void>
  18. {
  19. using base_t = strategies::detail::spherical_base<void>;
  20. public:
  21. static auto azimuth()
  22. {
  23. return strategy::azimuth::spherical<CalculationType>();
  24. }
  25. };
  26. namespace services
  27. {
  28. template <typename Point1, typename Point2>
  29. struct default_strategy<Point1, Point2, spherical_equatorial_tag, spherical_equatorial_tag>
  30. {
  31. using type = strategies::azimuth::spherical<>;
  32. };
  33. template <typename CT>
  34. struct strategy_converter<strategy::azimuth::spherical<CT> >
  35. {
  36. static auto get(strategy::azimuth::spherical<CT> const&)
  37. {
  38. return strategies::azimuth::spherical<CT>();
  39. }
  40. };
  41. } // namespace services
  42. }} // namespace strategies::azimuth
  43. }} // namespace boost::geometry
  44. #endif // BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SPHERICAL_HPP