geographic.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_INDEX_GEOGRAPHIC_HPP
  7. #define BOOST_GEOMETRY_STRATEGIES_INDEX_GEOGRAPHIC_HPP
  8. #include <boost/geometry/strategies/distance/geographic.hpp>
  9. #include <boost/geometry/strategies/index/services.hpp>
  10. namespace boost { namespace geometry { namespace strategies { namespace index
  11. {
  12. template
  13. <
  14. typename FormulaPolicy = strategy::andoyer,
  15. typename Spheroid = srs::spheroid<double>,
  16. typename CalculationType = void
  17. >
  18. class geographic
  19. : public distance::geographic<FormulaPolicy, Spheroid, CalculationType>
  20. {
  21. typedef distance::geographic<FormulaPolicy, Spheroid, CalculationType> base_t;
  22. public:
  23. geographic() = default;
  24. explicit geographic(Spheroid const& spheroid)
  25. : base_t(spheroid)
  26. {}
  27. };
  28. namespace services
  29. {
  30. template <typename Geometry>
  31. struct default_strategy<Geometry, geographic_tag>
  32. {
  33. using type = strategies::index::geographic<>;
  34. };
  35. } // namespace services
  36. }}}} // namespace boost::geometry::strategy::index
  37. #endif // BOOST_GEOMETRY_STRATEGIES_INDEX_GEOGRAPHIC_HPP