envelope.hpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
  5. // This file was modified by Oracle on 2015-2020.
  6. // Modifications copyright (c) 2015-2020, Oracle and/or its affiliates.
  7. // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
  8. // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
  9. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  10. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  11. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  12. // Distributed under the Boost Software License, Version 1.0.
  13. // (See accompanying file LICENSE_1_0.txt or copy at
  14. // http://www.boost.org/LICENSE_1_0.txt)
  15. #ifndef BOOST_GEOMETRY_STRATEGY_GEOGRAPHIC_ENVELOPE_HPP
  16. #define BOOST_GEOMETRY_STRATEGY_GEOGRAPHIC_ENVELOPE_HPP
  17. #include <boost/geometry/srs/spheroid.hpp>
  18. #include <boost/geometry/strategy/geographic/envelope_segment.hpp>
  19. #include <boost/geometry/strategy/geographic/expand_segment.hpp>
  20. #include <boost/geometry/strategies/geographic/parameters.hpp>
  21. #include <boost/geometry/strategy/spherical/envelope.hpp>
  22. namespace boost { namespace geometry
  23. {
  24. namespace strategy { namespace envelope
  25. {
  26. template
  27. <
  28. typename FormulaPolicy = strategy::andoyer,
  29. typename Spheroid = geometry::srs::spheroid<double>,
  30. typename CalculationType = void
  31. >
  32. class geographic
  33. : public spherical<CalculationType>
  34. {
  35. public:
  36. typedef geographic_tag cs_tag;
  37. typedef Spheroid model_type;
  38. inline geographic()
  39. : m_spheroid()
  40. {}
  41. explicit inline geographic(Spheroid const& spheroid)
  42. : m_spheroid(spheroid)
  43. {}
  44. Spheroid model() const
  45. {
  46. return m_spheroid;
  47. }
  48. private:
  49. Spheroid m_spheroid;
  50. };
  51. #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  52. namespace services
  53. {
  54. template <typename Tag, typename CalculationType>
  55. struct default_strategy<Tag, geographic_tag, CalculationType>
  56. {
  57. typedef strategy::envelope::geographic
  58. <
  59. strategy::andoyer,
  60. geometry::srs::spheroid<double>,
  61. CalculationType
  62. > type;
  63. };
  64. }
  65. #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
  66. }} // namespace strategy::envelope
  67. }} //namepsace boost::geometry
  68. #endif // BOOST_GEOMETRY_STRATEGY_GEOGRAPHIC_ENVELOPE_HPP