mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-18 05:08:11 +00:00
Added thirdparty: boost library
This commit is contained in:
+68
@@ -0,0 +1,68 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_CARTESIAN_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_CARTESIAN_HPP
|
||||
|
||||
|
||||
//#include <boost/geometry/strategies/cartesian/azimuth.hpp>
|
||||
|
||||
//#include <boost/geometry/strategies/cartesian/distance_projected_point.hpp>
|
||||
//#include <boost/geometry/strategies/cartesian/distance_pythagoras.hpp>
|
||||
#include <boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp>
|
||||
#include <boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp>
|
||||
#include <boost/geometry/strategies/cartesian/distance_segment_box.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/detail.hpp>
|
||||
#include <boost/geometry/strategies/distance/detail.hpp>
|
||||
#include <boost/geometry/strategies/closest_points/services.hpp>
|
||||
|
||||
//#include <boost/geometry/strategies/normalize.hpp>
|
||||
#include <boost/geometry/strategies/distance/cartesian.hpp>
|
||||
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategies { namespace closest_points
|
||||
{
|
||||
|
||||
template <typename CalculationType = void>
|
||||
struct cartesian
|
||||
: public strategies::distance::cartesian<CalculationType>
|
||||
{
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
static auto closest_points(Geometry1 const&, Geometry2 const&,
|
||||
distance::detail::enable_if_ps_t<Geometry1, Geometry2> * = nullptr)
|
||||
{
|
||||
return strategy::closest_points::projected_point<CalculationType>();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
struct default_strategy<Geometry1, Geometry2, cartesian_tag, cartesian_tag>
|
||||
{
|
||||
using type = strategies::closest_points::cartesian<>;
|
||||
};
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::closest_points
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_CARTESIAN_HPP
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_GEOGRAPHIC_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_GEOGRAPHIC_HPP
|
||||
|
||||
#include <boost/geometry/strategies/detail.hpp>
|
||||
#include <boost/geometry/strategies/distance/detail.hpp>
|
||||
#include <boost/geometry/strategies/closest_points/services.hpp>
|
||||
#include <boost/geometry/strategies/geographic/closest_points_pt_seg.hpp>
|
||||
#include <boost/geometry/strategies/geographic/parameters.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/distance/geographic.hpp>
|
||||
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategies { namespace closest_points
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename FormulaPolicy = geometry::strategy::andoyer,
|
||||
typename Spheroid = srs::spheroid<double>,
|
||||
typename CalculationType = void
|
||||
>
|
||||
class geographic
|
||||
: public strategies::distance::geographic<FormulaPolicy, Spheroid, CalculationType>
|
||||
{
|
||||
using base_t = strategies::distance::geographic<FormulaPolicy, Spheroid, CalculationType>;
|
||||
|
||||
public:
|
||||
|
||||
geographic() = default;
|
||||
|
||||
explicit geographic(Spheroid const& spheroid)
|
||||
: base_t(spheroid)
|
||||
{}
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
auto closest_points(Geometry1 const&, Geometry2 const&,
|
||||
distance::detail::enable_if_ps_t<Geometry1, Geometry2> * = nullptr) const
|
||||
{
|
||||
return strategy::closest_points::geographic_cross_track
|
||||
<
|
||||
FormulaPolicy,
|
||||
Spheroid,
|
||||
CalculationType
|
||||
>(base_t::m_spheroid);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
struct default_strategy<Geometry1, Geometry2, geographic_tag, geographic_tag>
|
||||
{
|
||||
using type = strategies::closest_points::geographic<>;
|
||||
};
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::closest_points
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_GEOGRAPHIC_HPP
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_SERVICES_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_SERVICES_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/static_assert.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/detail.hpp>
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategies { namespace closest_points
|
||||
{
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename Geometry1,
|
||||
typename Geometry2,
|
||||
typename CSTag1 = typename geometry::cs_tag<Geometry1>::type,
|
||||
typename CSTag2 = typename geometry::cs_tag<Geometry2>::type
|
||||
>
|
||||
struct default_strategy
|
||||
{
|
||||
BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
|
||||
"Not implemented for these Geometries' coordinate systems.",
|
||||
Geometry1, Geometry2, CSTag1, CSTag2);
|
||||
};
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::closest_points
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_SERVICES_HPP
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_SPHERICAL_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_SPHERICAL_HPP
|
||||
|
||||
#include <boost/geometry/strategies/spherical/closest_points_pt_seg.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/detail.hpp>
|
||||
#include <boost/geometry/strategies/distance/detail.hpp>
|
||||
#include <boost/geometry/strategies/closest_points/services.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/distance/spherical.hpp>
|
||||
|
||||
#include <boost/geometry/util/type_traits.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategies { namespace closest_points
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename RadiusTypeOrSphere = double,
|
||||
typename CalculationType = void
|
||||
>
|
||||
class spherical
|
||||
: public strategies::distance::spherical<RadiusTypeOrSphere, CalculationType>
|
||||
{
|
||||
using base_t = strategies::distance::spherical<RadiusTypeOrSphere, CalculationType>;
|
||||
|
||||
public:
|
||||
spherical() = default;
|
||||
|
||||
template <typename RadiusOrSphere>
|
||||
explicit spherical(RadiusOrSphere const& radius_or_sphere)
|
||||
: base_t(radius_or_sphere)
|
||||
{}
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
auto closest_points(Geometry1 const&, Geometry2 const&,
|
||||
distance::detail::enable_if_ps_t<Geometry1, Geometry2> * = nullptr) const
|
||||
{
|
||||
return strategy::closest_points::cross_track<CalculationType>(base_t::radius());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template <typename Geometry1, typename Geometry2>
|
||||
struct default_strategy
|
||||
<
|
||||
Geometry1,
|
||||
Geometry2,
|
||||
spherical_equatorial_tag,
|
||||
spherical_equatorial_tag
|
||||
>
|
||||
{
|
||||
using type = strategies::closest_points::spherical<>;
|
||||
};
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::closest_points
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_CLOSEST_POINTS_SPHERICAL_HPP
|
||||
Reference in New Issue
Block a user