mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-13 00:22:10 +00:00
[get_turns][relate] Handle spikes for L/L !opposite collinear and equal turns.
2 Turns are generated for a spike, one with operation_blocked the second one with operation_intersection. relate_linear_linear is not working yet, for now it is only ensured that boundaries will not be checked for those turns, which would result with assert failure. TODO: opposite collinear and equal, touches c/c and endpoints intersecting a spike + the adaptation of relate(L,L).
This commit is contained in:
@@ -109,6 +109,30 @@ void test_all()
|
||||
test_geometry<ls, ls>("LINESTRING(1 0,7 0,8 1)", "LINESTRING(0 0,10 0,10 10,5 0,4 1)",
|
||||
expected("mii")("muu")("muu"));
|
||||
|
||||
// spike - c2
|
||||
test_geometry<ls, ls>("LINESTRING(2 2,4 4,1 1)", "LINESTRING(0 0,4 4,6 3)",
|
||||
expected("mii")("txu")("tiu")("mxi"));
|
||||
// spike - e
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,4 4,1 1)", "LINESTRING(0 0,4 4,6 3)",
|
||||
expected("tii")("txu")("tiu")("mxi"));
|
||||
// spike - c1
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(0 0,4 4,6 3)",
|
||||
expected("tii")("mxu")("miu")("mxi"));
|
||||
// opposite e
|
||||
//test_geometry<ls, ls>("LINESTRING(4 4,0 0,2 2)", "LINESTRING(0 0,4 4,6 3)",
|
||||
// expected("tiu")("txi")("tii")("mxu"));
|
||||
|
||||
// TODO:
|
||||
//test_geometry<ls, ls>("LINESTRING(0 0,2 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
|
||||
//test_geometry<ls, ls>("LINESTRING(2 0,0 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
|
||||
|
||||
//test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(3 0,3 3,3 1)", "0F1FF0102");
|
||||
//test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 3,2 1)", "0F1FF0102");
|
||||
//test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 2,2 1)", "0F1FF0102");
|
||||
|
||||
//test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");
|
||||
|
||||
|
||||
//if ( boost::is_same<T, double>::value )
|
||||
//{
|
||||
// to_svg<ls, ls>("LINESTRING(0 0,1 0,2 0,2.5 0,3 1)", "LINESTRING(0 0,2 0,2.5 0,3 1)", "test11.svg");
|
||||
|
||||
@@ -69,18 +69,27 @@ void test_linestring_linestring()
|
||||
// test_geometry<ls, ls>("LINESTRING(0 0,5 0,3 0,6 0)", "LINESTRING(0 0,6 0)", true);
|
||||
// test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,3 3,6 3)", true);
|
||||
|
||||
// SPIKES! CURRENTLY NOT HANDLED
|
||||
//test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1,5 3)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
|
||||
//test_geometry<ls, ls>("LINESTRING(5 3,1 1,3 3,2 2,0 0)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
|
||||
//test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1,5 3)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
|
||||
//test_geometry<ls, ls>("LINESTRING(5 3,1 1,3 3,2 2,0 0)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
|
||||
// SPIKES!
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1,5 3)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
|
||||
test_geometry<ls, ls>("LINESTRING(5 3,1 1,3 3,2 2,0 0)", "LINESTRING(0 0,3 3,6 3)", "1F100F102");
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1,5 3)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
|
||||
test_geometry<ls, ls>("LINESTRING(5 3,1 1,3 3,2 2,0 0)", "LINESTRING(6 3,3 3,0 0)", "1F100F102");
|
||||
|
||||
// spikes
|
||||
// FOR NOW DISABLED
|
||||
/*test_geometry<ls, ls>("LINESTRING(0 0,10 0)",
|
||||
"LINESTRING(1 0,9 0,2 0)", "101FF0FF2");
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,10 0)", "LINESTRING(1 0,9 0,2 0)", "101FF0FF2");
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,3 3,6 3)", "1FF00F102");
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,4 4,6 3)", "1FF00F102");*/
|
||||
// TODO: REWRITE MATRICES
|
||||
// BEGIN
|
||||
/*test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,1 1)", "LINESTRING(0 0,4 4,6 3)", "1FF00F102");
|
||||
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,2 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
|
||||
test_geometry<ls, ls>("LINESTRING(2 0,0 0,1 0)", "LINESTRING(0 1,0 0,2 0)", "1FF00F102");
|
||||
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(3 0,3 3,3 1)", "0F1FF0102");
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 3,2 1)", "0F1FF0102");
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,3 3,1 1)", "LINESTRING(2 0,2 2,2 1)", "0F1FF0102");
|
||||
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");*/
|
||||
// END
|
||||
|
||||
test_geometry<ls, ls>("LINESTRING(0 0,2 2,3 3,4 4)", "LINESTRING(0 0,1 1,4 4)", "1FFF0FFF2");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user