/
usr
/
include
/
boost
/
geometry
/
strategies
/
spherical
/
/usr/include/boost/geometry/strategies/spherical
mkdir
upload
Name
Size
Mode
Actions
area.hpp
4959
0644
edit
dl
rm
azimuth.hpp
3489
0644
edit
dl
rm
compare.hpp
9997
0644
edit
dl
rm
densify.hpp
4079
0644
edit
dl
rm
disjoint_box_box.hpp
4633
0644
edit
dl
rm
disjoint_segment_box.hpp
3588
0644
edit
dl
rm
distance_cross_track.hpp
27455
0644
edit
dl
rm
distance_cross_track_box_box.hpp
15443
0644
edit
dl
rm
distance_cross_track_point_box.hpp
13202
0644
edit
dl
rm
distance_haversine.hpp
9669
0644
edit
dl
rm
distance_segment_box.hpp
14187
0644
edit
dl
rm
envelope.hpp
4370
0644
edit
dl
rm
envelope_box.hpp
2130
0644
edit
dl
rm
envelope_multipoint.hpp
13234
0644
edit
dl
rm
envelope_point.hpp
3397
0644
edit
dl
rm
envelope_segment.hpp
14133
0644
edit
dl
rm
expand_box.hpp
5203
0644
edit
dl
rm
expand_point.hpp
8242
0644
edit
dl
rm
expand_segment.hpp
3435
0644
edit
dl
rm
get_radius.hpp
2109
0644
edit
dl
rm
index.hpp
6805
0644
edit
dl
rm
intersection.hpp
39856
0644
edit
dl
rm
io.hpp
1977
0644
edit
dl
rm
line_interpolate.hpp
3131
0644
edit
dl
rm
point_in_point.hpp
5771
0644
edit
dl
rm
point_in_poly_winding.hpp
21516
0644
edit
dl
rm
point_order.hpp
3787
0644
edit
dl
rm
side_by_cross_track.hpp
2864
0644
edit
dl
rm
ssf.hpp
5038
0644
edit
dl
rm
Edit:
/usr/include/boost/geometry/strategies/spherical/line_interpolate.hpp
(3131B)
// Boost.Geometry // Copyright (c) 2018, 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_SPHERICAL_LINE_INTERPOLATE_HPP #define BOOST_GEOMETRY_STRATEGIES_SPHERICAL_LINE_INTERPOLATE_HPP #include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/coordinate_dimension.hpp> #include <boost/geometry/core/coordinate_type.hpp> #include <boost/geometry/core/radian_access.hpp> #include <boost/geometry/formulas/interpolate_point_spherical.hpp> #include <boost/geometry/srs/spheroid.hpp> #include <boost/geometry/strategies/line_interpolate.hpp> #include <boost/geometry/strategies/spherical/distance_haversine.hpp> #include <boost/geometry/util/select_calculation_type.hpp> namespace boost { namespace geometry { namespace strategy { namespace line_interpolate { /*! \brief Interpolate point on a spherical segment. \ingroup strategies \tparam CalculationType \tparam_calculation \tparam DistanceStrategy The underlying point-point distance strategy \qbk{ [heading See also] \* [link geometry.reference.algorithms.line_interpolate.line_interpolate_4_with_strategy line_interpolate (with strategy)] } */ template < typename CalculationType = void, typename DistanceStrategy = distance::haversine<double, CalculationType> > class spherical { public: typedef typename DistanceStrategy::radius_type radius_type; inline spherical() {} explicit inline spherical(typename DistanceStrategy::radius_type const& r) : m_strategy(r) {} inline spherical(DistanceStrategy const& s) : m_strategy(s) {} // point-point strategy getters struct distance_pp_strategy { typedef DistanceStrategy type; }; inline typename distance_pp_strategy::type get_distance_pp_strategy() const { return m_strategy; } template <typename Point, typename Fraction, typename Distance> inline void apply(Point const& p0, Point const& p1, Fraction const& fraction, Point & p, Distance const&) const { typedef typename select_calculation_type_alt < CalculationType, Point >::type calc_t; formula::interpolate_point_spherical<calc_t> formula; calc_t angle01; formula.compute_angle(p0, p1, angle01); formula.compute_axis(p0, angle01); calc_t a = angle01 * fraction; formula.compute_point(a, p); } private : DistanceStrategy m_strategy; }; #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS namespace services { template <> struct default_strategy<spherical_equatorial_tag> { typedef strategy::line_interpolate::spherical<> type; }; } // namespace services #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS }} // namespace strategy::line_interpolate }} // namespace boost::geometry #endif // BOOST_GEOMETRY_STRATEGIES_SPHERICAL_LINE_INTERPOLATE_HPP
Save
cmd:
run