mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 05:24:02 +00:00
fix: services in geo distance_cross_track_box_box
This commit is contained in:
parent
8cbbb605c7
commit
c661868894
@ -1,5 +1,7 @@
|
|||||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||||
|
|
||||||
|
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
|
||||||
|
|
||||||
// Copyright (c) 2017-2021, Oracle and/or its affiliates.
|
// Copyright (c) 2017-2021, Oracle and/or its affiliates.
|
||||||
|
|
||||||
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
|
||||||
@ -133,67 +135,52 @@ private :
|
|||||||
namespace services
|
namespace services
|
||||||
{
|
{
|
||||||
|
|
||||||
template <typename Strategy, typename Spheroid, typename CalculationType>
|
template <typename FormulaPolicy, typename Spheroid, typename CalculationType>
|
||||||
struct tag<geographic_cross_track_box_box<Strategy, Spheroid, CalculationType> >
|
struct tag<geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType> >
|
||||||
{
|
{
|
||||||
typedef strategy_tag_distance_box_box type;
|
typedef strategy_tag_distance_box_box type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename Strategy, typename Spheroid, typename CalculationType, typename Box1, typename Box2>
|
template <typename FormulaPolicy, typename Spheroid, typename CalculationType, typename Box1, typename Box2>
|
||||||
struct return_type<geographic_cross_track_box_box<Strategy, Spheroid, CalculationType>, Box1, Box2>
|
struct return_type<geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType>, Box1, Box2>
|
||||||
: geographic_cross_track_box_box
|
: geographic_cross_track_box_box
|
||||||
<
|
<
|
||||||
Strategy, Spheroid, CalculationType
|
FormulaPolicy, Spheroid, CalculationType
|
||||||
>::template return_type<Box1, Box2>
|
>::template return_type<Box1, Box2>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
template <typename Strategy, typename Spheroid, typename Box1, typename Box2>
|
|
||||||
struct return_type<geographic_cross_track_box_box<Strategy, Spheroid>, Box1, Box2>
|
|
||||||
: geographic_cross_track_box_box
|
|
||||||
<
|
|
||||||
Strategy, Spheroid
|
|
||||||
>::template return_type<Box1, Box2>
|
|
||||||
{};
|
|
||||||
|
|
||||||
template <typename Strategy, typename Box1, typename Box2>
|
template <typename FormulaPolicy, typename Spheroid, typename CalculationType>
|
||||||
struct return_type<geographic_cross_track_box_box<Strategy>, Box1, Box2>
|
struct comparable_type<geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType> >
|
||||||
: geographic_cross_track_box_box
|
|
||||||
<
|
|
||||||
Strategy
|
|
||||||
>::template return_type<Box1, Box2>
|
|
||||||
{};
|
|
||||||
|
|
||||||
template <typename Strategy, typename Spheroid, typename CalculationType>
|
|
||||||
struct comparable_type<geographic_cross_track_box_box<Strategy, Spheroid, CalculationType> >
|
|
||||||
{
|
{
|
||||||
typedef geographic_cross_track_box_box
|
typedef geographic_cross_track_box_box
|
||||||
<
|
<
|
||||||
typename comparable_type<Strategy>::type, Spheroid, CalculationType
|
FormulaPolicy, Spheroid, CalculationType
|
||||||
> type;
|
> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename Strategy, typename Spheroid, typename CalculationType>
|
template <typename FormulaPolicy, typename Spheroid, typename CalculationType>
|
||||||
struct get_comparable<geographic_cross_track_box_box<Strategy, Spheroid, CalculationType> >
|
struct get_comparable<geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType> >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static inline geographic_cross_track_box_box<Strategy, Spheroid, CalculationType>
|
static inline geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType>
|
||||||
apply(geographic_cross_track_box_box<Strategy, Spheroid, CalculationType> const& str)
|
apply(geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType> const& str)
|
||||||
{
|
{
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template <typename Strategy, typename Spheroid, typename CalculationType, typename Box1, typename Box2>
|
template <typename FormulaPolicy, typename Spheroid, typename CalculationType, typename Box1, typename Box2>
|
||||||
struct result_from_distance
|
struct result_from_distance
|
||||||
<
|
<
|
||||||
geographic_cross_track_box_box<Strategy, Spheroid, CalculationType>, Box1, Box2
|
geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType>, Box1, Box2
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef geographic_cross_track_box_box<Strategy, Spheroid, CalculationType> this_strategy;
|
typedef geographic_cross_track_box_box<FormulaPolicy, Spheroid, CalculationType> this_strategy;
|
||||||
|
|
||||||
typedef typename this_strategy::template return_type
|
typedef typename this_strategy::template return_type
|
||||||
<
|
<
|
||||||
@ -205,12 +192,7 @@ public:
|
|||||||
static inline return_type apply(this_strategy const& strategy,
|
static inline return_type apply(this_strategy const& strategy,
|
||||||
T const& distance)
|
T const& distance)
|
||||||
{
|
{
|
||||||
result_from_distance
|
return static_cast<return_type>(distance);
|
||||||
<
|
|
||||||
Strategy,
|
|
||||||
point_type_t<Box1>,
|
|
||||||
point_type_t<Box2>
|
|
||||||
>::apply(strategy, distance);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user