1 // Boost.Geometry (aka GGL, Generic Geometry Library)
3 // Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
5 // Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
7 // This file was modified by Oracle on 2015, 2016, 2018, 2019.
8 // Modifications copyright (c) 2015-2019, Oracle and/or its affiliates.
10 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
11 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
12 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
14 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
15 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
17 // Distributed under the Boost Software License, Version 1.0.
18 // (See accompanying file LICENSE_1_0.txt or copy at
19 // http://www.boost.org/LICENSE_1_0.txt)
21 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_ENVELOPE_HPP
22 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_ENVELOPE_HPP
24 #include <boost/geometry/srs/spheroid.hpp>
26 #include <boost/geometry/strategies/geographic/envelope_segment.hpp>
27 #include <boost/geometry/strategies/geographic/expand_segment.hpp>
28 #include <boost/geometry/strategies/geographic/parameters.hpp>
29 #include <boost/geometry/strategies/spherical/envelope.hpp>
31 namespace boost { namespace geometry
34 namespace strategy { namespace envelope
40 typename FormulaPolicy = strategy::andoyer,
41 typename Spheroid = geometry::srs::spheroid<double>,
42 typename CalculationType = void
45 : public spherical<CalculationType>
48 typedef geographic_tag cs_tag;
50 typedef Spheroid model_type;
56 explicit inline geographic(Spheroid const& spheroid)
57 : m_spheroid(spheroid)
60 typedef geographic_segment
62 FormulaPolicy, Spheroid, CalculationType
63 > element_envelope_strategy_type;
64 inline element_envelope_strategy_type get_element_envelope_strategy() const
66 return element_envelope_strategy_type(m_spheroid);
69 typedef expand::geographic_segment
71 FormulaPolicy, Spheroid, CalculationType
72 > element_expand_strategy_type;
73 inline element_expand_strategy_type get_element_expand_strategy() const
75 return element_expand_strategy_type(m_spheroid);
78 template <typename Point1, typename Point2, typename Box>
79 inline void apply(Point1 const& point1, Point2 const& point2, Box& box) const
86 >(m_spheroid).apply(point1, point2, box);
93 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
98 template <typename Tag, typename CalculationType>
99 struct default_strategy<Tag, geographic_tag, CalculationType>
101 typedef strategy::envelope::geographic
104 geometry::srs::spheroid<double>,
111 #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
114 }} // namespace strategy::envelope
116 }} //namepsace boost::geometry
118 #endif // BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_ENVELOPE_HPP