spherical.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Boost.Geometry
  2. // Copyright (c) 2021-2022, 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_BUFFER_SPHERICAL_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_BUFFER_SPHERICAL_HPP
  8. #include <boost/geometry/strategies/buffer/services.hpp>
  9. #include <boost/geometry/strategies/distance/spherical.hpp>
  10. namespace boost { namespace geometry
  11. {
  12. namespace strategies { namespace buffer
  13. {
  14. template
  15. <
  16. typename RadiusTypeOrSphere = double,
  17. typename CalculationType = void
  18. >
  19. class spherical
  20. : public strategies::distance::detail::spherical<RadiusTypeOrSphere, CalculationType>
  21. {
  22. using base_t = strategies::distance::detail::spherical<RadiusTypeOrSphere, CalculationType>;
  23. public:
  24. spherical() = default;
  25. template <typename RadiusOrSphere>
  26. explicit spherical(RadiusOrSphere const& radius_or_sphere)
  27. : base_t(radius_or_sphere)
  28. {}
  29. };
  30. namespace services
  31. {
  32. template <typename Geometry>
  33. struct default_strategy<Geometry, spherical_equatorial_tag>
  34. {
  35. using type = strategies::buffer::spherical<>;
  36. };
  37. } // namespace services
  38. }} // namespace strategies::buffer
  39. }} // namespace boost::geometry
  40. #endif // BOOST_GEOMETRY_STRATEGIES_BUFFER_SPHERICAL_HPP