geographic.hpp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Boost.Geometry
  2. // Copyright (c) 2020-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_GEOGRAPHIC_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_HPP
  8. #include <boost/geometry/strategies/area/geographic.hpp>
  9. #include <boost/geometry/strategies/azimuth/geographic.hpp>
  10. #include <boost/geometry/strategies/convex_hull/geographic.hpp>
  11. #include <boost/geometry/strategies/envelope/geographic.hpp>
  12. #include <boost/geometry/strategies/expand/geographic.hpp>
  13. #include <boost/geometry/strategies/io/geographic.hpp>
  14. #include <boost/geometry/strategies/index/geographic.hpp>
  15. #include <boost/geometry/strategies/relate/geographic.hpp>
  16. namespace boost { namespace geometry
  17. {
  18. namespace strategies
  19. {
  20. template
  21. <
  22. typename FormulaPolicy = strategy::andoyer,
  23. std::size_t SeriesOrder = strategy::default_order<FormulaPolicy>::value,
  24. typename Spheroid = srs::spheroid<double>,
  25. typename CalculationType = void
  26. >
  27. class geographic
  28. // derived from the umbrella strategy defining the most strategies
  29. : public index::geographic<FormulaPolicy, SeriesOrder, Spheroid, CalculationType>
  30. {
  31. using base_t = index::geographic<FormulaPolicy, SeriesOrder, Spheroid, CalculationType>;
  32. public:
  33. geographic()
  34. : base_t()
  35. {}
  36. explicit geographic(Spheroid const& spheroid)
  37. : base_t(spheroid)
  38. {}
  39. auto azimuth() const
  40. {
  41. return strategy::azimuth::geographic
  42. <
  43. FormulaPolicy, Spheroid, CalculationType
  44. >(base_t::m_spheroid);
  45. }
  46. auto point_order() const
  47. {
  48. return strategy::point_order::geographic
  49. <
  50. FormulaPolicy, Spheroid, CalculationType
  51. >(base_t::m_spheroid);
  52. }
  53. };
  54. } // namespace strategies
  55. }} // namespace boost::geometry
  56. #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_HPP