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.
8 // Modifications copyright (c) 2015-2016, 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
13 // Distributed under the Boost Software License, Version 1.0.
14 // (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
17 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_LINEAR_HPP
18 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_LINEAR_HPP
20 #include <boost/geometry/core/cs.hpp>
21 #include <boost/geometry/core/tags.hpp>
23 #include <boost/geometry/iterators/segment_iterator.hpp>
25 #include <boost/geometry/algorithms/detail/envelope/range.hpp>
27 #include <boost/geometry/algorithms/dispatch/envelope.hpp>
30 namespace boost { namespace geometry
33 #ifndef DOXYGEN_NO_DETAIL
34 namespace detail { namespace envelope
38 struct envelope_linestring_on_spheroid
40 template <typename Linestring, typename Box, typename Strategy>
41 static inline void apply(Linestring const& linestring,
43 Strategy const& strategy)
45 envelope_range::apply(geometry::segments_begin(linestring),
46 geometry::segments_end(linestring),
53 }} // namespace detail::envelope
54 #endif // DOXYGEN_NO_DETAIL
57 #ifndef DOXYGEN_NO_DISPATCH
62 template <typename Linestring, typename CS_Tag>
63 struct envelope<Linestring, linestring_tag, CS_Tag>
64 : detail::envelope::envelope_range
67 template <typename Linestring>
68 struct envelope<Linestring, linestring_tag, spherical_equatorial_tag>
69 : detail::envelope::envelope_linestring_on_spheroid
72 template <typename Linestring>
73 struct envelope<Linestring, linestring_tag, geographic_tag>
74 : detail::envelope::envelope_linestring_on_spheroid
78 template <typename MultiLinestring, typename CS_Tag>
81 MultiLinestring, multi_linestring_tag, CS_Tag
82 > : detail::envelope::envelope_multi_range
84 detail::envelope::envelope_range
88 template <typename MultiLinestring>
91 MultiLinestring, multi_linestring_tag, spherical_equatorial_tag
92 > : detail::envelope::envelope_multi_range_on_spheroid
94 detail::envelope::envelope_linestring_on_spheroid
98 template <typename MultiLinestring>
101 MultiLinestring, multi_linestring_tag, geographic_tag
102 > : detail::envelope::envelope_multi_range_on_spheroid
104 detail::envelope::envelope_linestring_on_spheroid
108 } // namespace dispatch
109 #endif // DOXYGEN_NO_DISPATCH
112 }} // namespace boost::geometry
114 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_LINEAR_HPP