3 // Copyright (c) 2021, Oracle and/or its affiliates.
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
10 #ifndef BOOST_GEOMETRY_STRATEGIES_LINE_INTERPOLATE_CARTESIAN_HPP
11 #define BOOST_GEOMETRY_STRATEGIES_LINE_INTERPOLATE_CARTESIAN_HPP
14 #include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
15 #include <boost/geometry/strategies/cartesian/line_interpolate.hpp>
17 #include <boost/geometry/strategies/detail.hpp>
18 #include <boost/geometry/strategies/distance/detail.hpp>
19 #include <boost/geometry/strategies/line_interpolate/services.hpp>
21 #include <boost/geometry/util/type_traits.hpp>
24 namespace boost { namespace geometry
27 namespace strategies { namespace line_interpolate
30 template <typename CalculationType = void>
32 : public strategies::detail::cartesian_base
34 template <typename Geometry1, typename Geometry2>
35 static auto distance(Geometry1 const&, Geometry2 const&,
36 distance::detail::enable_if_pp_t<Geometry1, Geometry2> * = nullptr)
38 return strategy::distance::pythagoras<CalculationType>();
41 template <typename Geometry>
42 static auto line_interpolate(Geometry const&)
44 return strategy::line_interpolate::cartesian<CalculationType>();
52 template <typename Geometry>
53 struct default_strategy<Geometry, cartesian_tag>
55 using type = strategies::line_interpolate::cartesian<>;
59 template <typename CT, typename DS>
60 struct strategy_converter<strategy::line_interpolate::cartesian<CT, DS> >
62 static auto get(strategy::line_interpolate::cartesian<CT, DS> const&)
64 return strategies::line_interpolate::cartesian<CT>();
69 } // namespace services
71 }} // namespace strategies::line_interpolate
73 }} // namespace boost::geometry
75 #endif // BOOST_GEOMETRY_STRATEGIES_LINE_INTERPOLATE_CARTESIAN_HPP