geographic.hpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_IS_CONVEX_GEOGRAPHIC_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_IS_CONVEX_GEOGRAPHIC_HPP
  8. #include <boost/geometry/strategies/convex_hull/geographic.hpp>
  9. #include <boost/geometry/strategies/detail.hpp>
  10. #include <boost/geometry/strategies/is_convex/services.hpp>
  11. namespace boost { namespace geometry
  12. {
  13. namespace strategies { namespace is_convex
  14. {
  15. template
  16. <
  17. typename FormulaPolicy = strategy::andoyer,
  18. typename Spheroid = srs::spheroid<double>,
  19. typename CalculationType = void
  20. >
  21. using geographic = strategies::convex_hull::geographic<FormulaPolicy, Spheroid, CalculationType>;
  22. namespace services
  23. {
  24. template <typename Geometry>
  25. struct default_strategy<Geometry, geographic_tag>
  26. {
  27. using type = strategies::convex_hull::geographic<>;
  28. };
  29. template <typename FP, typename S, typename CT>
  30. struct strategy_converter<strategy::side::geographic<FP, S, CT>>
  31. {
  32. static auto get(strategy::side::geographic<FP, S, CT> const& s)
  33. {
  34. return strategies::is_convex::geographic<FP, S, CT>(s.model());
  35. }
  36. };
  37. } // namespace services
  38. }} // namespace strategies::is_convex
  39. }} // namespace boost::geometry
  40. #endif // BOOST_GEOMETRY_STRATEGIES_IS_CONVEX_GEOGRAPHIC_HPP