Warning, file /include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_DISJOINT_SEGMENT_BOX_HPP
0013 #define BOOST_GEOMETRY_STRATEGIES_GEOGRAPHIC_DISJOINT_SEGMENT_BOX_HPP
0014
0015
0016 #include <cstddef>
0017 #include <utility>
0018
0019 #include <boost/geometry/util/math.hpp>
0020 #include <boost/geometry/util/calculation_type.hpp>
0021
0022 #include <boost/geometry/core/access.hpp>
0023 #include <boost/geometry/core/tags.hpp>
0024 #include <boost/geometry/core/coordinate_dimension.hpp>
0025 #include <boost/geometry/core/point_type.hpp>
0026
0027 #include <boost/geometry/algorithms/detail/assign_indexed_point.hpp>
0028 #include <boost/geometry/algorithms/detail/disjoint/segment_box.hpp>
0029
0030 #include <boost/geometry/srs/spheroid.hpp>
0031
0032
0033 #include <boost/geometry/strategies/cartesian/point_in_box.hpp>
0034 #include <boost/geometry/strategies/disjoint.hpp>
0035 #include <boost/geometry/strategies/geographic/azimuth.hpp>
0036 #include <boost/geometry/strategies/geographic/parameters.hpp>
0037 #include <boost/geometry/strategies/normalize.hpp>
0038 #include <boost/geometry/strategies/spherical/disjoint_box_box.hpp>
0039
0040
0041 namespace boost { namespace geometry { namespace strategy { namespace disjoint
0042 {
0043
0044
0045
0046
0047
0048 template
0049 <
0050 typename FormulaPolicy = strategy::andoyer,
0051 typename Spheroid = srs::spheroid<double>,
0052 typename CalculationType = void
0053 >
0054 struct segment_box_geographic
0055 {
0056 public:
0057 typedef Spheroid model_type;
0058
0059 inline segment_box_geographic()
0060 : m_spheroid()
0061 {}
0062
0063 explicit inline segment_box_geographic(Spheroid const& spheroid)
0064 : m_spheroid(spheroid)
0065 {}
0066
0067 typedef covered_by::spherical_point_box disjoint_point_box_strategy_type;
0068
0069 static inline disjoint_point_box_strategy_type get_disjoint_point_box_strategy()
0070 {
0071 return disjoint_point_box_strategy_type();
0072 }
0073
0074 template <typename Segment, typename Box>
0075 inline bool apply(Segment const& segment, Box const& box) const
0076 {
0077 geometry::strategy::azimuth::geographic
0078 <
0079 FormulaPolicy,
0080 Spheroid,
0081 CalculationType
0082 > azimuth_geographic(m_spheroid);
0083
0084 return geometry::detail::disjoint::disjoint_segment_box_sphere_or_spheroid
0085 <
0086 geographic_tag
0087 >::apply(segment, box,
0088 azimuth_geographic,
0089 strategy::normalize::spherical_point(),
0090 strategy::covered_by::spherical_point_box(),
0091 strategy::disjoint::spherical_box_box());
0092 }
0093
0094 Spheroid const& model() const
0095 {
0096 return m_spheroid;
0097 }
0098
0099 private:
0100 Spheroid m_spheroid;
0101 };
0102
0103
0104 #ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS
0105
0106
0107 namespace services
0108 {
0109
0110 template <typename Linear, typename Box, typename LinearTag>
0111 struct default_strategy<Linear, Box, LinearTag, box_tag, 1, 2,
0112 geographic_tag, geographic_tag>
0113 {
0114 typedef segment_box_geographic<> type;
0115 };
0116
0117 template <typename Box, typename Linear, typename LinearTag>
0118 struct default_strategy<Box, Linear, box_tag, LinearTag, 2, 1,
0119 geographic_tag, geographic_tag>
0120 {
0121 typedef segment_box_geographic<> type;
0122 };
0123
0124
0125 }
0126
0127
0128 #endif
0129
0130
0131 }}}}
0132
0133
0134 #endif