]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/overlay/get_turns_linear_linear_sph.cpp
4 // Copyright (c) 2016-2021, Oracle and/or its affiliates.
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
7 // Use, modification and distribution is subject to the Boost Software License,
8 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
12 #include "test_get_turns.hpp"
13 #include <boost/geometry/geometries/geometries.hpp>
19 typedef bg::model::point
<T
, 2, bg::cs::spherical_equatorial
<bg::degree
> > pt
;
20 typedef bg::model::linestring
<pt
> ls
;
21 typedef bg::model::multi_linestring
<ls
> mls
;
23 // NOTE: currently for the first endpoint of the Linestring on collinear segment
24 // is_collinear flags are set to FALSE!
25 // E.g. in the first test tii++, NOT tii==
27 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0)", "LINESTRING(0 0,2 0)", "tii++", "txx==");
28 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0)", "LINESTRING(2 0,0 0)", "tix+=", "txi=+");
30 test_geometry
<ls
, ls
>("LINESTRING(1 0,1 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
31 test_geometry
<ls
, ls
>("LINESTRING(1 0,0 0)", "LINESTRING(0 0,1 0,2 0)", "txi=+", "tiu+=");
32 test_geometry
<ls
, ls
>("LINESTRING(1 0,2 0)", "LINESTRING(0 0,1 0,2 0)", "tii++", "txx==");
33 test_geometry
<ls
, ls
>("LINESTRING(1 1,1 0)", "LINESTRING(0 0,1 0,2 0)", "txu++");
34 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "tii++", "txu==");
35 test_geometry
<ls
, ls
>("LINESTRING(2 0,1 0)", "LINESTRING(0 0,1 0,2 0)", "txi=+", "tix+=");
37 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,1 1)", "tuu++");
38 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,0 0)", "tix+=", "tui=+");
39 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 0,2 0)", "tii++", "txx==");
40 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(1 1,1 0)", "tux++");
41 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(0 0,1 0)", "tii++", "tux==");
42 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 0)", "LINESTRING(2 0,1 0)", "tix+=", "txi=+");
44 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 1,1 0,3 0,3 1)", "mii++", "ccc==", "muu==");
45 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(1 -1,1 0,3 0,3 -1)", "mii++", "ccc==", "muu==");
46 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 1,3 0,1 0,1 1)", "miu+=", "mui=+");
47 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,4 0)", "LINESTRING(3 -1,3 0,1 0,1 -1)", "miu+=", "mui=+");
48 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 1,2 0,4 0,4 1)", "tii++", "ccc==", "tuu==");
49 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(2 -1,2 0,4 0,4 -1)", "tii++", "ccc==", "tuu==");
50 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 1,4 0,2 0,2 1)", "tiu+=", "tui=+");
51 test_geometry
<ls
, ls
>("LINESTRING(0 0,2 0,3 0,4 0,6 0)", "LINESTRING(4 -1,4 0,2 0,2 -1)", "tiu+=", "tui=+");
53 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(1 0,2 1,3 5)", "tii++", "ecc==", "tux==");
54 test_geometry
<ls
, ls
>("LINESTRING(0 0,1 0,2 1,3 5,4 0)", "LINESTRING(3 5,2 1,1 0)", "tix+=", "ecc==", "tui=+");
55 test_geometry
<ls
, ls
>("LINESTRING(1 0,2 1,3 5)", "LINESTRING(0 0,1 0,2 1,3 5,4 0)", "txu==", "ecc==", "tii++");
56 test_geometry
<ls
, ls
>("LINESTRING(3 5,2 1,1 0)", "LINESTRING(0 0,1 0,2 1,3 5,4 0)", "tiu+=", "ecc==", "txi=+");
58 test_geometry
<ls
, ls
>("LINESTRING(0 0,10 0)", "LINESTRING(-1 -1,1 0,10 0,20 -1)", "mii++", "txu==");
59 test_geometry
<ls
, ls
>("LINESTRING(0 0,10 0)", "LINESTRING(20 -1,10 0,1 0,-1 -1)", "miu+=", "txi=+");
60 test_geometry
<ls
, ls
>("LINESTRING(-1 -1,1 0,10 0,20 -1)", "LINESTRING(0 0,10 0)", "mii++", "tux==");
61 test_geometry
<ls
, ls
>("LINESTRING(20 -1,10 0,1 0,-1 -1)", "LINESTRING(0 0,10 0)", "mui=+", "tix+=");
63 test_geometry
<ls
, ls
>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)",
64 "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)",
65 expected("tii++")("ecc==")("muu==")("mii++")("muu==")("mii++")("mux=="));
66 test_geometry
<ls
, ls
>("LINESTRING(-1 1,0 0,1 0,4 0,5 5,10 5,15 0,31 0)",
67 "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)",
68 expected("tiu+=")("ecc==")("mui=+")("miu+=")("mui=+")("miu+=")("mui=+"));
69 test_geometry
<ls
, ls
>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)",
70 "LINESTRING(-1 -1,0 0,1 0,2 0,2.5 1,3 0,30 0)",
71 expected("tui=+")("ecc==")("miu+=")("mui=+")("miu+=")("mui=+")("mix+="));
72 test_geometry
<ls
, ls
>("LINESTRING(31 0,15 0,10 5,5 5,4 0,1 0,0 0,-1 1)",
73 "LINESTRING(30 0,3 0,2.5 1,2 0,1 0,0 0,-1 -1)",
74 expected("tuu==")("ecc==")("mii++")("muu==")("mii++")("muu==")("mii++"));
76 if (BOOST_GEOMETRY_CONDITION((std::is_same
<T
, double>::value
)))
78 test_geometry
<ls
, ls
>("LINESTRING(-1 0,1 0,2 1.0004570537241201524198894179384922,3 2)",
79 "LINESTRING(4 5,3 2,1 0,0 0)",
80 "mix+=", "txi=+", "ecc==");
81 test_geometry
<ls
, ls
>("LINESTRING(4 5,3 2,1 0,0 0)",
82 "LINESTRING(-1 0,1 0,2 1.0004570537241201524198894179384922,3 2)",
83 "mxi=+", "tix+=", "ecc==");
86 test_geometry
<ls
, ls
>("LINESTRING(30 0,20 0,1 1,-1 -1)", "LINESTRING(0 -1,0 0,1 -1,20 0,25 0)", "mix+=", "tui=+", "muu++");
87 test_geometry
<ls
, ls
>("LINESTRING(0 -1,0 0,1 -1,20 0,25 0)", "LINESTRING(30 0,20 0,1 1,-1 -1)", "mxi=+", "tiu+=", "muu++");
89 test_geometry
<ls
, ls
>("LINESTRING(0 0,30 0)", "LINESTRING(4 0,4 1,20 1,5 0,1 0)", "muu++", "mui=+", "mix+=");
90 test_geometry
<ls
, ls
>("LINESTRING(4 0,4 1,20 1,5 0,1 0)", "LINESTRING(0 0,30 0)", "muu++", "miu+=", "mxi=+");
92 test_geometry
<ls
, ls
>("LINESTRING(30 0,0 0)", "LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)",
93 expected("mui=+")("miu+=")("mui=+")("mix+="));
94 test_geometry
<ls
, ls
>("LINESTRING(1 0,5 0,20 1,4 1,4 0,5 0)", "LINESTRING(30 0,0 0)",
95 expected("miu+=")("mui=+")("miu+=")("mxi=+"));
97 test_geometry
<ls
, ls
>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,4 -1)",
98 expected("mii++")("iuu++")("muu=="));
99 test_geometry
<ls
, ls
>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,5 0,4 1)",
100 expected("mii++")("muu++")("muu=="));
103 test_geometry
<ls
, ls
>("LINESTRING(0 1,0 0)", "LINESTRING(0 0,1 0,2 0)", "txu++");
104 test_geometry
<ls
, ls
>("LINESTRING(0 1,0 0,1 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
105 test_geometry
<ls
, ls
>("LINESTRING(0 1,1 0,2 1)", "LINESTRING(0 0,1 0,2 0)", "tuu++");
107 // SPIKE - NON-ENDPOINT - NON-OPPOSITE
110 test_geometry
<ls
, ls
>("LINESTRING(0 2,0 4,0 1)", "LINESTRING(0 0,0 4,6 3)",
111 expected("mii++")("txu==")("tiu==")("mxi=+"));
113 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 1)", "LINESTRING(0 0,0 4,6 3)",
114 expected("tii++")("txu==")("tiu==")("mxi=+"));
116 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 3,0 1)", "LINESTRING(0 0,0 4,6 3)",
117 expected("tii++")("mxu==")("miu==")("mxi=+"));
119 test_geometry
<ls
, ls
>("LINESTRING(0 1,0 3,0 2)", "LINESTRING(0 0,0 4,6 3)",
120 expected("mii++")("mxu==")("miu==")("mxi=+"));
122 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 3,0 2)", "LINESTRING(0 1,0 4,6 3)",
123 expected("mii++")("mxu==")("miu==")("mxi=+"));
125 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(0 1,0 4,6 3)",
126 expected("mii++")("txu==")("tiu==")("mxi=+"));
127 // spike - out out/eq
128 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(1 0,0 4,6 3)",
130 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(-1 0,0 4,6 3)",
132 // spike - out out/neq
133 test_geometry
<ls
, ls
>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(-1 0,1 0,6 3)",
135 test_geometry
<ls
, ls
>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(-1 0,1 0,6 3)",
138 // SPIKE - NON-ENDPOINT - OPPOSITE
141 test_geometry
<ls
, ls
>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -1,0 0,0 4,6 3)",
142 expected("tiu+=")("txi=+")("tii=+")("mxu=="));
143 test_geometry
<ls
, ls
>("LINESTRING(0 -1,0 0,0 4,6 3)", "LINESTRING(0 6,0 4,0 0,0 2)",
144 expected("tui=+")("tix+=")("tii+=")("mux=="));
146 test_geometry
<ls
, ls
>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -1,0 0,0 5,6 3)",
147 expected("miu+=")("txi=+")("tii=+")("mxu=="));
149 test_geometry
<ls
, ls
>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -2,0 -1,0 4,6 3)",
150 expected("tiu+=")("mxi=+")("mii=+")("mxu=="));
151 // opposite - neq neq
152 test_geometry
<ls
, ls
>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -2,0 -1,0 3,6 3)",
153 expected("miu+=")("mxi=+")("mii=+")("mxu=="));
154 // opposite - neq neq
155 test_geometry
<ls
, ls
>("LINESTRING(0 6,0 4,0 0,0 2)", "LINESTRING(0 -2,0 -1,0 3,0 5,6 3)",
156 expected("miu+=")("mxi=+")("mii=+")("mxu=="));
158 test_geometry
<ls
, ls
>("LINESTRING(6 3,0 3,0 0)", "LINESTRING(0 0,0 2,0 3,0 1)",
159 expected("txi=+")("tix+=")("tii+=")("mux=="));
161 // SPIKE - ENDPOINT - NON-OPPOSITE
164 test_geometry
<ls
, ls
>("LINESTRING(0 2,0 4,0 1)", "LINESTRING(0 0,0 4)",
165 expected("mii++")("txx==")("tix==")("mxi=+"));
166 test_geometry
<ls
, ls
>("LINESTRING(0 2,0 4,0 1)", "LINESTRING(0 4,0 0)",
167 expected("miu+=")("txi=+")("tii=+")("mxu=="));
169 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 1)", "LINESTRING(0 0,0 4)",
170 expected("tii++")("txx==")("tix==")("mxi=+"));
171 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 1)", "LINESTRING(0 4,0 0)",
172 expected("tix+=")("txi=+")("tii=+")("mxu=="));
174 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 3,0 1)", "LINESTRING(0 0,0 4)",
175 expected("tii++")("mxu==")("miu==")("mxi=+"));
176 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 3,0 1)", "LINESTRING(0 4,0 0)",
177 expected("tix+=")("mxi=+")("mii=+")("mxu=="));
179 test_geometry
<ls
, ls
>("LINESTRING(0 1,0 3,0 2)", "LINESTRING(0 0,0 4)",
180 expected("mii++")("mxu==")("miu==")("mxi=+"));
181 test_geometry
<ls
, ls
>("LINESTRING(0 1,0 3,0 2)", "LINESTRING(0 4,0 0)",
182 expected("miu+=")("mxi=+")("mii=+")("mxu=="));
184 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 3,0 2)", "LINESTRING(0 1,0 4)",
185 expected("mii++")("mxu==")("miu==")("mxi=+"));
186 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 3,0 2)", "LINESTRING(0 4,0 1)",
187 expected("mix+=")("mxi=+")("mii=+")("mxu=="));
189 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(0 1,0 4)",
190 expected("mii++")("txx==")("tix==")("mxi=+"));
191 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(0 4,0 1)",
192 expected("mix+=")("txi=+")("tii=+")("mxu=="));
193 // spike - out out/eq
194 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(1 0,0 4)",
196 test_geometry
<ls
, ls
>("LINESTRING(0 0,0 4,0 2)", "LINESTRING(-1 0,0 4)",
198 // spike - out out/neq
199 test_geometry
<ls
, ls
>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(-1 0,1 0)",
201 test_geometry
<ls
, ls
>("LINESTRING(0 -2,0 0,0 -1)", "LINESTRING(1 0,-1 0)",
205 test_geometry
<ls
, ls
>("LINESTRING(3 0,0 0)",
206 "LINESTRING(4 2,1 0,9 0)",
207 expected("mui=+")("miu+="));
211 test_geometry
<ls
, ls
>("LINESTRING(6 0,0 0,5 0)",
212 "LINESTRING(2 0,0 0,-10 0)",
213 expected("mii++")("txu==")("tiu==")("mui=+"));
214 // the reversal could be automatic...
215 test_geometry
<ls
, ls
>("LINESTRING(2 0,0 0,-10 0)",
216 "LINESTRING(6 0,0 0,5 0)",
217 expected("mii++")("tux==")("tui==")("miu+="));
219 test_geometry
<ls
, ls
>("LINESTRING(6 0,0 0)",
220 "LINESTRING(2 0,0 0,-10 0)",
221 expected("mii++")("txu=="));
222 test_geometry
<ls
, ls
>("LINESTRING(0 0,5 0)",
223 "LINESTRING(2 0,0 0,-10 0)",
224 expected("tiu+=")("mui=+"));
226 if ( BOOST_GEOMETRY_CONDITION((std::is_same
<T
, double>::value
)) )
228 test_geometry
<ls
, ls
>("LINESTRING(0 -1, 10 -1, 20 1)",
229 "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
230 expected("mii++")("ccc==")("mux=="));
231 test_geometry
<ls
, ls
>("LINESTRING(0 -1, 10 -1, 20 1)",
232 "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392, 12 10)",
233 expected("miu+=")("mui=+"));
234 test_geometry
<ls
, ls
>("LINESTRING(20 1, 10 -1, 0 -1)",
235 "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
236 expected("mui=+")("mix+="));
237 test_geometry
<ls
, ls
>("LINESTRING(20 1, 10 -1, 0 0)",
238 "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392, 12 10)",
239 expected("muu==")("ccc==")("mii++"));
241 test_geometry
<ls
, ls
>("LINESTRING(0 -1, 10 -1, 20 1)",
242 "LINESTRING(12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
243 expected("mii++")("ccc==")("mux=="));
244 test_geometry
<ls
, ls
>("LINESTRING(0 -1, 10 -1, 20 1)",
245 "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392)",
246 expected("mix+=")("mui=+"));
247 test_geometry
<ls
, ls
>("LINESTRING(20 1, 10 -1, 0 -1)",
248 "LINESTRING(12.5 -0.50051443471392, 15 0, 17.5 0.50051443471392)",
249 expected("mui=+")("mix+="));
250 test_geometry
<ls
, ls
>("LINESTRING(20 1, 10 -1, 0 -1)",
251 "LINESTRING(17.5 0.50051443471392, 15 0, 12.5 -0.50051443471392)",
252 expected("mux==")("ccc==")("mii++"));
254 test_geometry
<ls
, ls
>("LINESTRING(0 -1, 10 -1, 20 1)",
255 "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0)",
256 expected("mii++")("mux=="));
257 test_geometry
<ls
, ls
>("LINESTRING(0 -1, 10 -1, 20 1)",
258 "LINESTRING(15 0, 12.5 -0.50051443471392, 12 10)",
259 expected("miu+=")("mui=+"));
260 test_geometry
<ls
, ls
>("LINESTRING(20 1, 10 -1, 0 -1)",
261 "LINESTRING(12 10, 12.5 -0.50051443471392, 15 0)",
262 expected("mui=+")("mix+="));
263 test_geometry
<ls
, ls
>("LINESTRING(20 1, 10 -1, 0 -1)",
264 "LINESTRING(15 0, 12.5 -0.50051443471392, 12 10)",
265 expected("muu==")("mii++"));
269 //test_geometry<ls, ls>("LINESTRING(0 0,2 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
270 //test_geometry<ls, ls>("LINESTRING(2 0,0 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
272 //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(3 0,3 3,3 1)", "0F1FF0102");
273 //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 3,2 1)", "0F1FF0102");
274 //test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 2,2 1)", "0F1FF0102");
276 //test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");
279 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,10 0,30 0))",
280 "MULTILINESTRING((0 10,5 0,20 0,20 0,30 0),(2 0,2 0),(3 0,3 0,3 0))",
281 expected("mii++")("ccc==")("ccc==")("txx=="));
284 test_geometry
<ls
, ls
>("LINESTRING(2 2,5 -1,15 2,18 0,20 0)",
285 "LINESTRING(30 0,19 0,18 0,0 0)",
286 expected("iuu++")("iuu++")("tiu+=")("mxi=+"));
288 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,10 0,5 0))",
289 "MULTILINESTRING((1 0,8 0,4 0))",
290 expected("mii++")("mix+=")("mux==")("mui==")("mix+=")("mii+=")("mxu==")("mxi=+"));
292 /*test_geometry<mls, mls>("MULTILINESTRING((0 0,10 0,5 0))",
293 "MULTILINESTRING((1 0,8 0,4 0),(2 0,9 0,5 0))",
294 expected("mii")("ccc")("ccc")("txx"));*/
297 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,10 0))",
298 "MULTILINESTRING((-1 0,0 0,-2 0),(11 0,10 0,12 0))",
299 expected("tuu++")("txu++"));
300 // internal turning R vs spike
301 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,2 1))",
302 "MULTILINESTRING((0 1,1 1,0 1))",
304 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,2 1))",
305 "MULTILINESTRING((1 2,1 1,1 2))",
307 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 0,0 0))",
308 "MULTILINESTRING((2 0,1 0,2 0))",
310 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,2 1))",
311 "MULTILINESTRING((0 2,1 1,0 2))",
313 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,2 1))",
314 "MULTILINESTRING((2 0,1 1,2 0))",
316 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,2 1))",
317 "MULTILINESTRING((2 1,1 1,2 1))",
318 expected("txi=+")("tix+=")("tii+=")("txx=="));
319 // internal turning L vs spike
320 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,0 1))",
321 "MULTILINESTRING((2 1,1 1,2 1))",
323 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,0 1))",
324 "MULTILINESTRING((1 2,1 1,1 2))",
326 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,0 1))",
327 "MULTILINESTRING((2 2,1 1,2 2))",
329 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,0 1))",
330 "MULTILINESTRING((0 0,1 1,0 0))",
332 test_geometry
<mls
, mls
>("MULTILINESTRING((1 0,1 1,0 1))",
333 "MULTILINESTRING((0 1,1 1,0 1))",
334 expected("txi=+")("tix+=")("tii+=")("txx=="));
335 // spike vs internal turning R
336 test_geometry
<mls
, mls
>("MULTILINESTRING((0 1,1 1,0 1))",
337 "MULTILINESTRING((1 0,1 1,2 1))",
339 test_geometry
<mls
, mls
>("MULTILINESTRING((1 2,1 1,1 2))",
340 "MULTILINESTRING((1 0,1 1,2 1))",
342 test_geometry
<mls
, mls
>("MULTILINESTRING((2 0,1 0,2 0))",
343 "MULTILINESTRING((0 0,1 0,0 0))",
345 test_geometry
<mls
, mls
>("MULTILINESTRING((0 2,1 1,0 2))",
346 "MULTILINESTRING((1 0,1 1,2 1))",
348 test_geometry
<mls
, mls
>("MULTILINESTRING((2 0,1 1,2 0))",
349 "MULTILINESTRING((1 0,1 1,2 1))",
351 test_geometry
<mls
, mls
>("MULTILINESTRING((2 1,1 1,2 1))",
352 "MULTILINESTRING((1 0,1 1,2 1))",
353 expected("tix+=")("txi=+")("tii=+")("txx=="));
354 // spike vs internal turning L
355 test_geometry
<mls
, mls
>("MULTILINESTRING((2 1,1 1,2 1))",
356 "MULTILINESTRING((1 0,1 1,0 1))",
358 test_geometry
<mls
, mls
>("MULTILINESTRING((1 2,1 1,1 2))",
359 "MULTILINESTRING((1 0,1 1,0 1))",
361 test_geometry
<mls
, mls
>("MULTILINESTRING((2 2,1 1,2 2))",
362 "MULTILINESTRING((1 0,1 1,0 1))",
364 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 1,0 0))",
365 "MULTILINESTRING((1 0,1 1,0 1))",
367 test_geometry
<mls
, mls
>("MULTILINESTRING((0 1,1 1,0 1))",
368 "MULTILINESTRING((1 0,1 1,0 1))",
369 expected("tix+=")("txi=+")("tii=+")("txx=="));
370 // spike vs internal collinear
371 test_geometry
<mls
, mls
>("MULTILINESTRING((0 1,1 1,0 1))",
372 "MULTILINESTRING((2 1,1 1,0 1))",
373 expected("tix+=")("txi=+")("tii=+")("txx=="));
374 // internal collinear vs spike
375 test_geometry
<mls
, mls
>("MULTILINESTRING((2 1,1 1,0 1))",
376 "MULTILINESTRING((0 1,1 1,0 1))",
377 expected("txi=+")("tix+=")("tii+=")("txx=="));
379 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 1,0 0))",
380 "MULTILINESTRING((2 2,1 1,2 2))",
382 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 1,0 0))",
383 "MULTILINESTRING((2 0,1 1,2 0))",
385 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 1,0 0))",
386 "MULTILINESTRING((2 1,1 1,2 1))",
388 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 1,0 0))",
389 "MULTILINESTRING((0 1,1 1,0 1))",
392 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 1,0 0))",
393 "MULTILINESTRING((0 0,1 1,0 0))",
394 expected("tii++")("tix+=")("txi=+")("txx==")
396 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,1 1,0 0))",
397 "MULTILINESTRING((1 1,0 0,1 1))",
398 expected("tix+=")("tii+=")("txx==")("txi==")
399 ("txi=+")("tii=+")("txx==")("tix=="));
401 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,10 0))",
402 "MULTILINESTRING((-1 0,0 0,2 0))",
403 expected("tii++")("mux=="));
404 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,10 0))",
405 "MULTILINESTRING((-1 -1,0 0,2 0))",
406 expected("tii++")("mux=="));
407 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,10 0))",
408 "MULTILINESTRING((2 0,0 0,-1 0))",
409 expected("tiu+=")("mui=+"));
410 test_geometry
<mls
, mls
>("MULTILINESTRING((0 0,10 0))",
411 "MULTILINESTRING((2 0,0 0,-1 -1))",
412 expected("tiu+=")("mui=+"));
415 int test_main(int, char* [])
420 #if ! defined(_MSC_VER)
421 test_all
<long double>();