|
5 | 5 | // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
|
6 | 6 | // Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
|
7 | 7 |
|
8 |
| -// This file was modified by Oracle on 2014. |
9 |
| -// Modifications copyright (c) 2014, Oracle and/or its affiliates. |
| 8 | +// This file was modified by Oracle on 2014, 2020. |
| 9 | +// Modifications copyright (c) 2014-2020 Oracle and/or its affiliates. |
10 | 10 |
|
| 11 | +// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle |
11 | 12 | // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
12 | 13 |
|
13 | 14 | // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
|
@@ -110,26 +111,45 @@ struct default_strategy<Box1, Box2, box_tag, box_tag, false>
|
110 | 111 | >
|
111 | 112 | {};
|
112 | 113 |
|
| 114 | +template <typename PolygonalOrLinear, typename Box> |
| 115 | +struct default_strategy_polygonal_or_linear |
| 116 | + : strategy::distance::services::default_strategy |
| 117 | + < |
| 118 | + segment_tag, box_tag, |
| 119 | + typename point_type<PolygonalOrLinear>::type, |
| 120 | + typename point_type<Box>::type |
| 121 | + > |
| 122 | +{}; |
| 123 | + |
113 | 124 | template <typename Linear, typename Box>
|
114 | 125 | struct default_strategy<Linear, Box, segment_tag, box_tag, false>
|
115 |
| - : strategy::distance::services::default_strategy |
116 |
| - < |
117 |
| - segment_tag, box_tag, |
118 |
| - typename point_type<Linear>::type, |
119 |
| - typename point_type<Box>::type |
120 |
| - > |
| 126 | + : default_strategy_polygonal_or_linear<Linear, Box> |
121 | 127 | {};
|
122 | 128 |
|
123 | 129 | template <typename Linear, typename Box>
|
124 |
| -struct default_strategy<Linear, Box, linear_tag, box_tag, false> |
125 |
| - : strategy::distance::services::default_strategy |
126 |
| - < |
127 |
| - segment_tag, box_tag, |
128 |
| - typename point_type<Linear>::type, |
129 |
| - typename point_type<Box>::type |
130 |
| - > |
| 130 | +struct default_strategy<Linear, Box, linestring_tag, box_tag, false> |
| 131 | + : default_strategy_polygonal_or_linear<Linear, Box> |
| 132 | +{}; |
| 133 | + |
| 134 | +template <typename Linear, typename Box> |
| 135 | +struct default_strategy<Linear, Box, multi_linestring_tag, box_tag, false> |
| 136 | + : default_strategy_polygonal_or_linear<Linear, Box> |
131 | 137 | {};
|
132 | 138 |
|
| 139 | +template <typename Polygonal, typename Box> |
| 140 | +struct default_strategy<Polygonal, Box, polygon_tag, box_tag, false> |
| 141 | + : default_strategy_polygonal_or_linear<Polygonal, Box> |
| 142 | +{}; |
| 143 | + |
| 144 | +template <typename Polygonal, typename Box> |
| 145 | +struct default_strategy<Polygonal, Box, ring_tag, box_tag, false> |
| 146 | + : default_strategy_polygonal_or_linear<Polygonal, Box> |
| 147 | +{}; |
| 148 | + |
| 149 | +template <typename Polygonal, typename Box> |
| 150 | +struct default_strategy<Polygonal, Box, multi_polygon_tag, box_tag, false> |
| 151 | + : default_strategy_polygonal_or_linear<Polygonal, Box> |
| 152 | +{}; |
133 | 153 |
|
134 | 154 |
|
135 | 155 | // Helper metafunction for default point-segment strategy retrieval
|
|
0 commit comments