Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:50:00

0001 // Boost.Geometry (aka GGL, Generic Geometry Library)
0002 
0003 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
0004 
0005 // This file was modified by Oracle on 2013-2022.
0006 // Modifications copyright (c) 2013-2022 Oracle and/or its affiliates.
0007 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0008 
0009 // Use, modification and distribution is subject to the Boost Software License,
0010 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0011 // http://www.boost.org/LICENSE_1_0.txt)
0012 
0013 #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_IMPLEMENTATION_HPP
0014 #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_IMPLEMENTATION_HPP
0015 
0016 
0017 #include <boost/geometry/algorithms/detail/relate/areal_areal.hpp>
0018 #include <boost/geometry/algorithms/detail/relate/box_areal.hpp>
0019 #include <boost/geometry/algorithms/detail/relate/interface.hpp>
0020 #include <boost/geometry/algorithms/detail/relate/linear_areal.hpp>
0021 #include <boost/geometry/algorithms/detail/relate/linear_linear.hpp>
0022 #include <boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp>
0023 #include <boost/geometry/algorithms/detail/relate/point_geometry.hpp>
0024 #include <boost/geometry/algorithms/detail/relate/point_point.hpp>
0025 
0026 #include <boost/geometry/core/tags.hpp>
0027 
0028 #include <boost/geometry/strategies/relate/cartesian.hpp>
0029 #include <boost/geometry/strategies/relate/geographic.hpp>
0030 #include <boost/geometry/strategies/relate/spherical.hpp>
0031 
0032 
0033 namespace boost { namespace geometry {
0034 
0035 
0036 #ifndef DOXYGEN_NO_DISPATCH
0037 namespace dispatch {
0038 
0039 template <typename Point1, typename Point2>
0040 struct relate<Point1, Point2, point_tag, point_tag, 0, 0, false>
0041     : detail::relate::point_point<Point1, Point2>
0042 {};
0043 
0044 template <typename Point, typename MultiPoint>
0045 struct relate<Point, MultiPoint, point_tag, multi_point_tag, 0, 0, false>
0046     : detail::relate::point_multipoint<Point, MultiPoint>
0047 {};
0048 
0049 template <typename MultiPoint, typename Point>
0050 struct relate<MultiPoint, Point, multi_point_tag, point_tag, 0, 0, false>
0051     : detail::relate::multipoint_point<MultiPoint, Point>
0052 {};
0053 
0054 template <typename MultiPoint1, typename MultiPoint2>
0055 struct relate<MultiPoint1, MultiPoint2, multi_point_tag, multi_point_tag, 0, 0, false>
0056     : detail::relate::multipoint_multipoint<MultiPoint1, MultiPoint2>
0057 {};
0058 
0059 // TODO - for now commented out because before implementing it we must consider:
0060 // 1. how the Box degenerated to a Point should be treated
0061 // 2. what should be the definition of a Box degenerated to a Point
0062 // 3. what fields should the matrix/mask contain for dimension > 2 and dimension > 9
0063 //
0064 //template <typename Point, typename Box, int TopDim2>
0065 //struct relate<Point, Box, point_tag, box_tag, 0, TopDim2, false>
0066 //    : detail::relate::point_box<Point, Box>
0067 //{};
0068 //
0069 //template <typename Box, typename Point, int TopDim1>
0070 //struct relate<Box, Point, box_tag, point_tag, TopDim1, 0, false>
0071 //    : detail::relate::box_point<Box, Point>
0072 //{};
0073 
0074 
0075 template <typename Point, typename Geometry, typename Tag2, int TopDim2>
0076 struct relate<Point, Geometry, point_tag, Tag2, 0, TopDim2, true>
0077     : detail::relate::point_geometry<Point, Geometry>
0078 {};
0079 
0080 template <typename Geometry, typename Point, typename Tag1, int TopDim1>
0081 struct relate<Geometry, Point, Tag1, point_tag, TopDim1, 0, true>
0082     : detail::relate::geometry_point<Geometry, Point>
0083 {};
0084 
0085 template <typename MultiPoint, typename Geometry, typename Tag2, int TopDim2>
0086 struct relate<MultiPoint, Geometry, multi_point_tag, Tag2, 0, TopDim2, false>
0087     : detail::relate::multi_point_geometry<MultiPoint, Geometry>
0088 {};
0089 
0090 template <typename Geometry, typename MultiPoint, typename Tag1, int TopDim1>
0091 struct relate<Geometry, MultiPoint, Tag1, multi_point_tag, TopDim1, 0, false>
0092     : detail::relate::geometry_multi_point<Geometry, MultiPoint>
0093 {};
0094 
0095 
0096 template <typename Linear1, typename Linear2, typename Tag1, typename Tag2>
0097 struct relate<Linear1, Linear2, Tag1, Tag2, 1, 1, true>
0098     : detail::relate::linear_linear<Linear1, Linear2>
0099 {};
0100 
0101 
0102 template <typename Linear, typename Areal, typename Tag1, typename Tag2>
0103 struct relate<Linear, Areal, Tag1, Tag2, 1, 2, true>
0104     : detail::relate::linear_areal<Linear, Areal>
0105 {};
0106 
0107 template <typename Areal, typename Linear, typename Tag1, typename Tag2>
0108 struct relate<Areal, Linear, Tag1, Tag2, 2, 1, true>
0109     : detail::relate::areal_linear<Areal, Linear>
0110 {};
0111 
0112 
0113 template <typename Areal1, typename Areal2, typename Tag1, typename Tag2>
0114 struct relate<Areal1, Areal2, Tag1, Tag2, 2, 2, true>
0115     : detail::relate::areal_areal<Areal1, Areal2>
0116 {};
0117 
0118 
0119 template <typename Box, typename Ring>
0120 struct relate<Box, Ring, box_tag, ring_tag, 2, 2, false>
0121     : detail::relate::box_areal<Box, Ring>
0122 {};
0123 
0124 template <typename Box, typename Polygon>
0125 struct relate<Box, Polygon, box_tag, polygon_tag, 2, 2, false>
0126     : detail::relate::box_areal<Box, Polygon>
0127 {};
0128 
0129 template <typename Box, typename MultiPolygon>
0130 struct relate<Box, MultiPolygon, box_tag, multi_polygon_tag, 2, 2, false>
0131     : detail::relate::box_areal<Box, MultiPolygon>
0132 {};
0133 
0134 
0135 } // namespace dispatch
0136 #endif // DOXYGEN_NO_DISPATCH
0137 
0138 
0139 }} // namespace boost::geometry
0140 
0141 #endif // BOOST_GEOMETRY_ALGORITHMS_DETAIL_RELATE_IMPLEMENTATION_HPP