update boost
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_AZIMUTH_CARTESIAN_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_AZIMUTH_CARTESIAN_HPP
|
||||
|
||||
|
||||
// TODO: move this file to boost/geometry/strategy
|
||||
#include <boost/geometry/strategies/cartesian/azimuth.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/azimuth/services.hpp>
|
||||
#include <boost/geometry/strategies/detail.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategies { namespace azimuth
|
||||
{
|
||||
|
||||
template <typename CalculationType = void>
|
||||
struct cartesian : strategies::detail::cartesian_base
|
||||
{
|
||||
static auto azimuth()
|
||||
{
|
||||
return strategy::azimuth::cartesian<CalculationType>();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
struct default_strategy<Point1, Point2, cartesian_tag, cartesian_tag>
|
||||
{
|
||||
using type = strategies::azimuth::cartesian<>;
|
||||
};
|
||||
|
||||
|
||||
template <typename CT>
|
||||
struct strategy_converter<strategy::azimuth::cartesian<CT> >
|
||||
{
|
||||
static auto get(strategy::azimuth::cartesian<CT> const&)
|
||||
{
|
||||
return strategies::azimuth::cartesian<CT>();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::azimuth
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_AZIMUTH_CARTESIAN_HPP
|
||||
@@ -0,0 +1,81 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_AZIMUTH_GEOGRAPHIC_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_AZIMUTH_GEOGRAPHIC_HPP
|
||||
|
||||
|
||||
// TODO: move this file to boost/geometry/strategy
|
||||
#include <boost/geometry/strategies/geographic/azimuth.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/azimuth/services.hpp>
|
||||
#include <boost/geometry/strategies/detail.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategies { namespace azimuth
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename FormulaPolicy = strategy::andoyer,
|
||||
typename Spheroid = srs::spheroid<double>,
|
||||
typename CalculationType = void
|
||||
>
|
||||
class geographic : strategies::detail::geographic_base<Spheroid>
|
||||
{
|
||||
using base_t = strategies::detail::geographic_base<Spheroid>;
|
||||
|
||||
public:
|
||||
geographic()
|
||||
: base_t()
|
||||
{}
|
||||
|
||||
explicit geographic(Spheroid const& spheroid)
|
||||
: base_t(spheroid)
|
||||
{}
|
||||
|
||||
auto azimuth() const
|
||||
{
|
||||
return strategy::azimuth::geographic
|
||||
<
|
||||
FormulaPolicy, Spheroid, CalculationType
|
||||
>(base_t::m_spheroid);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
struct default_strategy<Point1, Point2, geographic_tag, geographic_tag>
|
||||
{
|
||||
using type = strategies::azimuth::geographic<>;
|
||||
};
|
||||
|
||||
|
||||
template <typename FP, typename S, typename CT>
|
||||
struct strategy_converter<strategy::azimuth::geographic<FP, S, CT> >
|
||||
{
|
||||
static auto get(strategy::azimuth::geographic<FP, S, CT> const& strategy)
|
||||
{
|
||||
return strategies::azimuth::geographic<FP, S, CT>(strategy.model());
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::azimuth
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_AZIMUTH_GEOGRAPHIC_HPP
|
||||
@@ -0,0 +1,56 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SERVICES_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SERVICES_HPP
|
||||
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/core/static_assert.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
|
||||
namespace strategies { namespace azimuth {
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
template
|
||||
<
|
||||
typename Point1, typename Point2,
|
||||
typename CSTag1 = typename geometry::cs_tag<Point1>::type,
|
||||
typename CSTag2 = typename geometry::cs_tag<Point2>::type
|
||||
>
|
||||
struct default_strategy
|
||||
{
|
||||
BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
|
||||
"Not implemented for these Points' coordinate systems.",
|
||||
Point1, Point2, CSTag1, CSTag2);
|
||||
};
|
||||
|
||||
template <typename Strategy>
|
||||
struct strategy_converter
|
||||
{
|
||||
BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
|
||||
"Not implemented for this Strategy.",
|
||||
Strategy);
|
||||
};
|
||||
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::azimuth
|
||||
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SERVICES_HPP
|
||||
@@ -0,0 +1,67 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2021, Oracle and/or its affiliates.
|
||||
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#ifndef BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SPHERICAL_HPP
|
||||
#define BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SPHERICAL_HPP
|
||||
|
||||
|
||||
// TODO: move this file to boost/geometry/strategy
|
||||
#include <boost/geometry/strategies/spherical/azimuth.hpp>
|
||||
|
||||
#include <boost/geometry/strategies/azimuth/services.hpp>
|
||||
#include <boost/geometry/strategies/detail.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace geometry
|
||||
{
|
||||
|
||||
namespace strategies { namespace azimuth
|
||||
{
|
||||
|
||||
template <typename CalculationType = void>
|
||||
class spherical : strategies::detail::spherical_base<void>
|
||||
{
|
||||
using base_t = strategies::detail::spherical_base<void>;
|
||||
|
||||
public:
|
||||
|
||||
static auto azimuth()
|
||||
{
|
||||
return strategy::azimuth::spherical<CalculationType>();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
namespace services
|
||||
{
|
||||
|
||||
|
||||
template <typename Point1, typename Point2>
|
||||
struct default_strategy<Point1, Point2, spherical_equatorial_tag, spherical_equatorial_tag>
|
||||
{
|
||||
using type = strategies::azimuth::spherical<>;
|
||||
};
|
||||
|
||||
template <typename CT>
|
||||
struct strategy_converter<strategy::azimuth::spherical<CT> >
|
||||
{
|
||||
static auto get(strategy::azimuth::spherical<CT> const&)
|
||||
{
|
||||
return strategies::azimuth::spherical<CT>();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} // namespace services
|
||||
|
||||
}} // namespace strategies::azimuth
|
||||
|
||||
}} // namespace boost::geometry
|
||||
|
||||
#endif // BOOST_GEOMETRY_STRATEGIES_AZIMUTH_SPHERICAL_HPP
|
||||
Reference in New Issue
Block a user