Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:36:44

0001 // Boost.Geometry
0002 
0003 // Copyright (c) 2021, Oracle and/or its affiliates.
0004 
0005 // Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
0006 
0007 // Licensed under the Boost Software License version 1.0.
0008 // http://www.boost.org/users/license.html
0009 
0010 #ifndef BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_GEOGRAPHIC_HPP
0011 #define BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_GEOGRAPHIC_HPP
0012 
0013 #include <boost/geometry/strategies/detail.hpp>
0014 #include <boost/geometry/strategies/distance/detail.hpp>
0015 #include <boost/geometry/strategies/closest_points/services.hpp>
0016 #include <boost/geometry/strategies/geographic/closest_points_pt_seg.hpp>
0017 #include <boost/geometry/strategies/geographic/parameters.hpp>
0018 
0019 #include <boost/geometry/strategies/distance/geographic.hpp>
0020 
0021 #include <boost/geometry/util/type_traits.hpp>
0022 
0023 
0024 namespace boost { namespace geometry
0025 {
0026 
0027 namespace strategies { namespace closest_points
0028 {
0029 
0030 template
0031 <
0032     typename FormulaPolicy = geometry::strategy::andoyer,
0033     typename Spheroid = srs::spheroid<double>,
0034     typename CalculationType = void
0035 >
0036 class geographic
0037     : public strategies::distance::geographic<FormulaPolicy, Spheroid, CalculationType>
0038 {
0039     using base_t = strategies::distance::geographic<FormulaPolicy, Spheroid, CalculationType>;
0040 
0041 public:
0042 
0043     geographic() = default;
0044 
0045     explicit geographic(Spheroid const& spheroid)
0046         : base_t(spheroid)
0047     {}
0048 
0049     template <typename Geometry1, typename Geometry2>
0050     auto closest_points(Geometry1 const&, Geometry2 const&,
0051                         distance::detail::enable_if_ps_t<Geometry1, Geometry2> * = nullptr) const
0052     {
0053         return strategy::closest_points::geographic_cross_track
0054             <
0055                 FormulaPolicy,
0056                 Spheroid,
0057                 CalculationType
0058             >(base_t::m_spheroid);
0059     }
0060 };
0061 
0062 
0063 namespace services
0064 {
0065 
0066 template <typename Geometry1, typename Geometry2>
0067 struct default_strategy<Geometry1, Geometry2, geographic_tag, geographic_tag>
0068 {
0069     using type = strategies::closest_points::geographic<>;
0070 };
0071 
0072 } // namespace services
0073 
0074 }} // namespace strategies::closest_points
0075 
0076 }} // namespace boost::geometry
0077 
0078 #endif // BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_GEOGRAPHIC_HPP