within.hpp 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // Boost.Geometry (aka GGL, Generic Geometry Library)
  2. // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
  3. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
  4. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
  5. // This file was modified by Oracle on 2017-2020.
  6. // Modifications copyright (c) 2017-2020, Oracle and/or its affiliates.
  7. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
  8. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
  9. // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
  10. // Use, modification and distribution is subject to the Boost Software License,
  11. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  12. // http://www.boost.org/LICENSE_1_0.txt)
  13. #ifndef BOOST_GEOMETRY_STRATEGIES_WITHIN_HPP
  14. #define BOOST_GEOMETRY_STRATEGIES_WITHIN_HPP
  15. #include <boost/geometry/core/cs.hpp>
  16. #include <boost/geometry/core/point_type.hpp>
  17. #include <boost/geometry/core/static_assert.hpp>
  18. #include <boost/geometry/core/tag.hpp>
  19. #include <boost/geometry/core/tags.hpp>
  20. #include <boost/geometry/core/tag_cast.hpp>
  21. namespace boost { namespace geometry
  22. {
  23. namespace strategy { namespace within
  24. {
  25. namespace services
  26. {
  27. /*!
  28. \brief Traits class binding a within determination strategy to a coordinate system
  29. \ingroup within
  30. \tparam GeometryContained geometry-type of input (possibly) contained type
  31. \tparam GeometryContaining geometry-type of input (possibly) containing type
  32. \tparam TagContained casted tag of (possibly) contained type
  33. \tparam TagContaining casted tag of (possibly) containing type
  34. \tparam CsTagContained tag of coordinate system of (possibly) contained type
  35. \tparam CsTagContaining tag of coordinate system of (possibly) containing type
  36. */
  37. template
  38. <
  39. typename GeometryContained,
  40. typename GeometryContaining,
  41. typename TagContained = tag_t<GeometryContained>,
  42. typename TagContaining = tag_t<GeometryContaining>,
  43. typename CastedTagContained = tag_cast_t
  44. <
  45. tag_t<GeometryContained>,
  46. pointlike_tag, linear_tag, polygonal_tag, areal_tag
  47. >,
  48. typename CastedTagContaining = tag_cast_t
  49. <
  50. tag_t<GeometryContaining>,
  51. pointlike_tag, linear_tag, polygonal_tag, areal_tag
  52. >,
  53. typename CsTagContained = tag_cast_t
  54. <
  55. cs_tag_t<point_type_t<GeometryContained>>,
  56. spherical_tag
  57. >,
  58. typename CsTagContaining = tag_cast_t
  59. <
  60. cs_tag_t<point_type_t<GeometryContaining>>,
  61. spherical_tag
  62. >
  63. >
  64. struct default_strategy
  65. {
  66. BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
  67. "Not implemented for these types.",
  68. GeometryContained, GeometryContaining);
  69. };
  70. } // namespace services
  71. }} // namespace strategy::within
  72. }} // namespace boost::geometry
  73. #endif // BOOST_GEOMETRY_STRATEGIES_WITHIN_HPP