geographic.hpp 1.3 KB

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