point_in_poly_winding.hpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Boost.Geometry
  2. // Copyright (c) 2017, 2019 Oracle and/or its affiliates.
  3. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  4. // Use, modification and distribution is subject to the Boost Software License,
  5. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. #ifndef BOOST_GEOMETRY_STRATEGY_GEOGRAPHIC_POINT_IN_POLY_WINDING_HPP
  8. #define BOOST_GEOMETRY_STRATEGY_GEOGRAPHIC_POINT_IN_POLY_WINDING_HPP
  9. #include <boost/geometry/strategies/geographic/side.hpp>
  10. #include <boost/geometry/strategies/spherical/point_in_poly_winding.hpp>
  11. namespace boost { namespace geometry
  12. {
  13. namespace strategy { namespace within
  14. {
  15. /*!
  16. \brief Within detection using winding rule in geographic coordinate system.
  17. \ingroup strategies
  18. \tparam Point \tparam_point
  19. \tparam PointOfSegment \tparam_segment_point
  20. \tparam FormulaPolicy Geodesic formula policy
  21. \tparam Spheroid Spheroid model
  22. \tparam CalculationType \tparam_calculation
  23. \qbk{
  24. [heading See also]
  25. [link geometry.reference.algorithms.within.within_3_with_strategy within (with strategy)]
  26. }
  27. */
  28. template
  29. <
  30. typename Point = void, // for backward compatibility
  31. typename PointOfSegment = Point, // for backward compatibility
  32. typename FormulaPolicy = strategy::andoyer,
  33. typename Spheroid = srs::spheroid<double>,
  34. typename CalculationType = void
  35. >
  36. class geographic_winding
  37. : public within::detail::spherical_winding_base
  38. <
  39. side::geographic<FormulaPolicy, Spheroid, CalculationType>,
  40. CalculationType
  41. >
  42. {
  43. typedef within::detail::spherical_winding_base
  44. <
  45. side::geographic<FormulaPolicy, Spheroid, CalculationType>,
  46. CalculationType
  47. > base_t;
  48. public:
  49. geographic_winding()
  50. {}
  51. explicit geographic_winding(Spheroid const& model)
  52. : base_t(model)
  53. {}
  54. Spheroid const& model() const
  55. {
  56. return base_t::m_side_strategy.model();
  57. }
  58. };
  59. }} // namespace strategy::within
  60. }} // namespace boost::geometry
  61. #endif // BOOST_GEOMETRY_STRATEGY_GEOGRAPHIC_POINT_IN_POLY_WINDING_HPP