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.
8 // Modifications copyright (c) 2015, Oracle and/or its affiliates.
10 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
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)
16 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_LINEAR_HPP
17 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_LINEAR_HPP
19 #include <boost/geometry/core/cs.hpp>
20 #include <boost/geometry/core/tags.hpp>
22 #include <boost/geometry/iterators/segment_iterator.hpp>
24 #include <boost/geometry/algorithms/detail/envelope/range.hpp>
26 #include <boost/geometry/algorithms/dispatch/envelope.hpp>
29 namespace boost { namespace geometry
32 #ifndef DOXYGEN_NO_DETAIL
33 namespace detail { namespace envelope
37 struct envelope_linestring_on_spheroid
39 template <typename Linestring, typename Box>
40 static inline void apply(Linestring const& linestring, Box& mbr)
42 envelope_range::apply(geometry::segments_begin(linestring),
43 geometry::segments_end(linestring),
49 }} // namespace detail::envelope
50 #endif // DOXYGEN_NO_DETAIL
53 #ifndef DOXYGEN_NO_DISPATCH
58 template <typename Linestring, typename CS_Tag>
59 struct envelope<Linestring, linestring_tag, CS_Tag>
60 : detail::envelope::envelope_range
63 template <typename Linestring>
64 struct envelope<Linestring, linestring_tag, spherical_equatorial_tag>
65 : detail::envelope::envelope_linestring_on_spheroid
69 template <typename MultiLinestring, typename CS_Tag>
72 MultiLinestring, multi_linestring_tag, CS_Tag
73 > : detail::envelope::envelope_multi_range
75 detail::envelope::envelope_range
79 template <typename MultiLinestring>
82 MultiLinestring, multi_linestring_tag, spherical_equatorial_tag
83 > : detail::envelope::envelope_multi_range_on_spheroid
85 detail::envelope::envelope_linestring_on_spheroid
90 } // namespace dispatch
91 #endif // DOXYGEN_NO_DISPATCH
94 }} // namespace boost::geometry
96 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_ENVELOPE_LINEAR_HPP