1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
// Boost.Geometry
// Copyright (c) 2025 Barend Gehrels, Amsterdam, the Netherlands.
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_GEOMETRY_TEST_BUFFER_CASES_HPP
#define BOOST_GEOMETRY_TEST_BUFFER_CASES_HPP
#include <string>
// The "w" series of recursive_polygons_buffer, which are or were failing for traversing through the graph
// using the biconnected components.
// Needs aligning position codes in assign_clustered_counts
static std::string const rt_w1
= "MULTIPOLYGON(((2 0,2 1,3 1,3 0,2 0)),((4 2,4 3,5 2,4 2)),((1 6,0 6,0 7,1 6)),((1 6,2 5,1 5,1 6)))";
// Caused by a wrong block_q in get_turn_info (resulting in ix i/o iu)
static std::string const rt_w2
= "MULTIPOLYGON(((6 3,6 4,7 4,6 3)),((6 3,5 2,5 3,6 3)))";
// Needs using collinear ahead properties for two u operations in a cluster, having the same target.
static std::string const rt_w3
= "MULTIPOLYGON(((8 3,8 4,9 4,9 3,8 3)),((7 5,7 6,8 6,7 5)),((5 5,4 4,4 5,5 5)),((5 5,6 5,5 4,5 5)),((0 7,0 8,1 8,0 7)),((2 2,2 3,3 3,2 2)),((2 8,3 8,3 7,3 6,2 6,2 8)))";
// Needs fix in arrival handling - it had weird turn info near node 3, ux, while both continue.
static std::string const rt_w4
= "MULTIPOLYGON(((4 6,4 7,5 6,4 6)),((8 0,8 1,9 1,8 0)),((1 6,1 7,2 7,1 6)),((0 2,0 3,1 2,0 2)),((5 2,6 3,6 2,5 2)),((5 2,5 1,4 1,4 2,5 2)),((2 9,3 8,2 8,1 8,1 9,2 9)))";
// Having a big clusters with all position codes, and two interior rings
static std::string const rt_w5
= "MULTIPOLYGON(((2 1,2 2,3 2,3 1,2 1)),((2 6,2 7,3 7,3 6,2 6)),((3 4,3 5,4 5,4 4,3 4)),((5 3,5 2,4 2,5 3)),((5 3,5 4,6 3,5 3)),((0 2,1 1,0 0,0 2)),((0 8,1 8,1 7,0 7,0 8)),((0 5,1 5,2 5,1 4,0 3,0 5)),((7 1,6 1,6 2,7 1)),((7 1,8 0,7 0,7 1)),((8 6,7 6,7 8,8 8,8 6)),((6 8,6 7,5 7,5 8,6 8)),((6 1,5 0,5 1,6 1)),((7 8,7 9,8 9,7 8)),((6 4,7 3,6 3,6 4)),((6 4,6 5,7 5,7 4,6 4)),((7 6,6 6,6 7,7 6)),((5 8,4 7,4 8,5 8)),((5 8,5 9,6 9,5 8)),((7 4,8 3,7 3,7 4)),((8 3,8 4,9 4,9 3,8 3)))";
// Fixed regression
static std::string const rt_w6
= "MULTIPOLYGON(((7 0,7 1,8 0,7 0)),((8 6,8 7,9 7,9 6,8 6)),((2 8,3 9,3 8,2 8)),((4 3,4 4,5 4,4 3)),((6 5,6 6,7 6,6 5)),((1 7,2 7,1 6,0 6,1 7)),((1 5,0 4,0 5,1 5)),((1 5,2 6,2 5,1 5)),((0 4,1 4,0 3,0 4)),((2 1,1 0,0 0,0 1,2 1)),((7 4,6 3,6 4,7 4)),((7 4,7 5,8 5,7 4)),((6 3,7 3,6 2,6 3)))";
// Originally fixed by first handling non-clustered turns. Now always fine.
static std::string const rt_w7
= "MULTIPOLYGON(((6 0,6 1,7 1,6 0)),((6 6,7 7,7 6,6 6)),((8 0,8 1,9 1,8 0)),((2 7,2 8,3 7,2 7)),((1 2,1 3,2 3,1 2)),((8 2,8 3,9 2,8 2)),((4 5,4 4,3 4,4 5)),((4 5,5 6,5 5,4 5)))";
// Fixed by select_collinear_target_edge
static std::string const rt_w8
= "MULTIPOLYGON(((0 4,0 5,1 5,0 4)),((1 3,1 4,2 4,1 3)),((2 8,2 9,3 8,2 8)),((6 3,6 4,7 3,6 3)),((7 1,7 2,8 2,8 1,7 1)),((0 2,0 3,1 2,0 2)),((0 2,1 1,0 1,0 2)),((3 2,3 1,2 1,3 2)),((3 2,2 2,3 3,3 2)),((9 6,9 5,8 5,9 6)),((9 6,8 6,8 7,9 7,9 6)),((5 2,5 1,4 1,4 2,5 2)),((5 2,5 3,6 2,5 2)),((5 6,4 6,4 7,5 6)),((5 6,6 5,5 5,5 6)),((5 6,6 7,6 6,5 6)))";
// fixed by setting operations to blocked
static std::string const rt_w9
= "MULTIPOLYGON(((3 8,4 9,4 8,3 8)),((4 2,4 4,5 3,5 2,4 2)),((4 2,4 1,3 1,3 2,4 2)),((2 4,2 5,3 5,3 4,3 3,2 3,2 2,1 2,1 3,2 4)),((8 8,7 8,7 9,8 8)),((8 8,9 8,8 7,8 8)),((1 2,0 2,0 3,1 2)),((4 6,3 6,3 7,4 6)),((4 6,5 6,5 5,4 5,4 6)),((8 7,8 6,7 6,8 7)),((8 6,9 7,9 6,8 6)))";
// fixed by position_code=3 in assign_clustered_counts
static std::string const rt_w10
= "MULTIPOLYGON(((3 2,3 3,4 3,3 2)),((2 8,2 9,3 9,3 8,2 8)),((7 8,7 9,8 9,7 8)),((4 4,5 5,5 4,4 4)),((5 7,5 8,6 7,5 7)),((6 2,7 3,7 2,6 2)),((0 3,1 4,1 3,0 2,0 3)),((8 5,8 4,7 4,8 5)),((8 5,8 6,9 5,8 5)),((7 4,6 4,6 5,7 5,7 4)),((3 6,4 7,4 6,3 6)),((3 6,3 5,2 5,3 6)),((8 2,8 1,7 1,8 2)),((8 2,8 3,9 2,8 2)),((1 3,2 2,1 2,1 3)))";
// same as rt_w1 - also its configuration is similar.
static std::string const rt_w11
= "MULTIPOLYGON(((2 8,2 9,3 9,3 8,2 8)),((6 7,6 8,7 8,7 7,6 7)),((5 0,5 1,6 1,6 0,5 0)),((4 2,4 3,5 2,4 2)),((4 2,4 1,3 1,3 2,4 2)),((1 6,0 6,0 7,1 6)),((1 6,2 5,1 5,1 6)),((4 1,4 0,3 0,4 1)))";
static std::string const rt_w12
= "MULTIPOLYGON(((0 7,0 8,1 7,0 7)),((4 3,4 4,5 3,4 3)),((5 2,6 3,6 2,5 2)),((5 2,4 1,4 2,5 2)))";
// fixed by using continue with count-left 0
static std::string const rt_w13
= "MULTIPOLYGON(((6 2,6 3,7 2,6 2)),((4 4,4 3,3 3,3 4,4 4)),((4 4,4 5,5 4,4 4)),((4 3,4 2,3 2,4 3)))";
// Caused by a wrong block_q in get_turn_info (resulting in ix i/o iu)
static std::string const rt_w14
= "MULTIPOLYGON(((6 0,6 1,7 0,6 0)),((1 4,2 5,2 4,1 4)),((1 2,1 3,2 3,1 2)),((3 7,3 8,4 7,3 7)),((2 1,3 2,3 1,2 1)),((3 5,3 6,4 6,4 5,3 5)),((7 4,6 4,6 5,7 4)),((7 4,8 3,7 3,7 4)))";
// Would need calling assign_count before enrich. But it is now harmonized
// to be the same as union/intersection
static std::string const rt_w15
= "MULTIPOLYGON(((3 8,3 9,4 9,4 8,3 8)),((0 8,1 9,1 8,0 8)),((1 6,1 7,2 7,2 6,1 6)),((7 7,8 8,8 7,7 7)),((4 3,3 3,3 4,4 3)),((4 3,5 2,4 2,4 3)),((1 5,2 5,2 4,2 3,1 3,1 4,0 4,1 5)),((6 1,7 0,6 0,6 1)),((6 1,5 1,6 2,6 1)),((7 0,7 1,8 0,7 0)),((2 1,3 1,3 0,1 0,2 1)),((2 1,2 2,3 2,2 1)))";
// fixed by ahead_side in cc
static std::string const rt_w16
= "MULTIPOLYGON(((6 4,6 5,7 5,6 4)),((4 0,4 1,5 0,4 0)),((4 2,4 3,5 3,4 2)),((1 2,1 3,2 3,2 2,1 2)))";
// fixed by keeping set_both_verified
static std::string const rt_w17
= "MULTIPOLYGON(((3 1,4 2,4 1,3 1)),((5 3,6 4,6 3,5 3)),((5 0,5 1,6 1,6 0,5 0)),((8 5,9 6,9 5,8 5)),((8 5,7 4,7 5,8 5)))";
// Needs checking turns of same cluster in turn_in_piece
static std::string const rt_w18
= "MULTIPOLYGON(((4 4,4 5,5 4,4 4)),((5 6,6 7,6 6,5 6)),((5 1,4 1,4 2,5 3,5 1)),((7 6,7 7,8 7,7 6)),((0 6,1 6,1 5,1 4,0 4,0 6)),((1 8,2 7,1 7,1 8)),((1 8,2 9,2 8,1 8)),((1 6,1 7,2 6,1 6)),((7 3,7 2,6 2,7 3)),((7 3,7 4,8 4,8 3,7 3)),((3 2,3 1,2 1,3 2)),((3 2,2 2,2 3,3 3,3 2)),((5 8,5 7,4 7,4 8,5 8)),((5 8,6 9,6 8,5 8)))";
// Contains a cc turn (1) located wrongly.
// Reported at 1/1, but should be 0/1 - or it should have a segment id belonging to previous segment.
// Fixed by removing specific arriving handling.
static std::string const rt_w19
= "MULTIPOLYGON(((3 8,3 9,4 9,3 8)),((3 4,4 5,4 4,3 4)),((7 0,7 1,8 1,7 0)),((8 5,9 6,9 5,8 5)),((2 7,3 7,3 6,2 6,2 7)),((7 4,8 3,7 3,6 3,7 4)))";
// REPORTED as #1359 - but somehow now fixed - issue was: start turn discarded while it should not be.
static std::string const rt_w20
= "MULTIPOLYGON(((2 8,2 9,3 8,2 8)),((7 1,7 2,8 1,7 1)),((5 2,5 3,6 2,5 2)),((2 2,2 3,3 3,2 2)),((1 3,1 4,2 4,1 3)),((6 4,6 5,7 4,6 4)),((9 8,8 8,9 9,9 8)),((9 8,9 7,8 7,9 8)))";
// reproduction of wrong order (i/u)
static std::string const rt_w21
= "MULTIPOLYGON(((2 8,2 9,3 8,2 8)),((4 6,4 7,5 6,4 6)),((4 2,5 2,4 1,4 2)))";
// Needs a spike. Also, it misses a small triangle, so area is not completely correct
// Also, needs checking turns of same cluster in turn_in_piece
static std::string const rt_w22
= "MULTIPOLYGON(((6 3,6 4,7 4,7 3,6 3)),((6 1,6 2,7 2,6 1)),((2 8,2 9,3 9,2 8)),((4 7,5 8,5 7,4 7)),((2 1,2 0,1 0,2 1)),((2 1,2 2,3 2,3 1,2 1)),((3 3,2 2,2 3,3 3)),((3 3,3 4,4 3,3 3)),((0 5,1 4,1 3,0 3,0 5)),((8 6,9 6,9 5,8 5,8 6)),((8 6,7 6,6 6,7 7,8 6)),((1 3,1 2,0 2,1 3)),((4 3,5 3,4 2,4 3)),((4 2,5 1,4 1,4 2)))";
// Caused by spike handling.
static std::string const rt_w23
= "MULTIPOLYGON(((4 0,4 1,5 1,5 0,4 0)),((1 3,1 4,2 4,2 3,1 3)),((6 3,6 4,7 4,7 3,6 3)),((6 8,7 9,7 8,6 8)),((4 8,5 9,5 8,4 8)),((4 4,4 5,5 5,5 4,4 4)),((8 1,8 0,7 0,7 1,8 1)))";
// Case with suspicious UX turn, causing a wrong graph, and more. Old algorithm could cope with it.
// This should be fixed in get_turn_info.
static std::string const rt_w24
= "MULTIPOLYGON(((2 3,2 4,3 3,2 3)),((8 5,8 6,9 6,8 5)),((3 6,4 5,3 5,3 6)),((3 6,4 7,4 6,3 6)),((5 2,5 3,6 3,5 2)),((5 8,6 9,6 8,5 8)),((0 5,1 6,1 5,0 5)),((0 1,0 2,1 1,0 1)))";
// Case with wrong order (i/u), corrected to cc, but it also needs adapting the left counts.
static std::string const rt_w25
= "MULTIPOLYGON(((0 5,0 6,1 5,0 5)),((6 1,7 1,7 0,6 0,6 1)),((1 6,1 7,2 6,1 6)),((8 7,8 8,9 8,9 7,8 7)),((8 1,9 2,9 1,8 1)),((0 1,0 2,1 2,1 1,0 1)),((6 3,6 4,7 3,6 3)),((4.5 8.5,5 8,4 8,4 9,5 9,4.5 8.5)),((2 4,3 5,4 5,4 4,2 4)),((3 7,4 8,4 7,3 7)),((3 7,2 7,2 8,3 7)))";
// Needs skip-count to be translated to travels_to_ip_index as -1, for a cc turn.
static std::string const rt_w26
= "MULTIPOLYGON(((6 6,6 7,7 6,6 6)),((0 0,0 1,1 1,1 0,0 0)),((3 6,2 5,2 7,2.5 6.5,3 7,4 6,5 5,3 5,3 6)),((3 2,2 2,2 3,1 3,3 5,3 2)),((3 1,4 0,3 0,3 1)),((3 1,2 0,2 1,3 1)),((3 7,2 7,2 8,3 7)),((1 8,0 8,0 9,1 9,1 8)),((1 8,2 7,1 7,1 8)),((2 5,1 5,1 6,2 6,1.5 5.5,2 5)),((5 0,5 1,6 1,6 0,5 0)),((1 3,1 2,0 2,1 3)),((4 6,4 7,5 7,5 6,4 6)),((1 6,0 6,0 7,1 6)),((1 5,1 4,0 4,0 5,1 5)),((6 1,6 2,7 2,7 1,6 1)),((6 2,6 3,7 3,6 2)),((7 1,8 1,8 0,7 0,7 1)))";
// Needs original arrival behaviour
static std::string const rt_w27
= "MULTIPOLYGON(((3 6,4 7,4 6,3 6)),((4 3,4 4,5 4,5 3,4 3)),((5 8,6 9,6 8,5 8)),((2 7,2 8,3 8,3 7,2 7)))";
// Fixed by fixing by suspicious UX turn.
static std::string const rt_w28
= "MULTIPOLYGON(((8 8,8 9,9 9,8 8)),((1 2,1 3,2 3,1 2)),((3 8,3 9,4 9,3 8)),((1 1,2 1,1 0,1 1)),((1 1,0 1,0 2,1 1)),((3 0,2 0,2 1,3 0)),((1 8,2 7,1 7,1 8)),((1 8,0 8,0 9,2 9,1 8)),((2.5 5.5,3 5,2 5,2 6,3 6,2.5 5.5)),((5 5,6 5,6 4,5 4,5 5)),((7 3,8 4,8 3,7 3)),((7 3,6 3,6 4,7 4,7 3)),((7 4,7 5,7 6,8 6,8 4,7 4)),((7 8,7 7,6 7,6 8,7 8)),((4 8,5 9,6 8,4 8)),((4 8,4 7,3 7,4 8)),((2 7,2 6,1 6,2 7)),((1 6,2 5,1 5,1 6)),((5 4,5 3,3 3,3 4,4 4,4 5,5 4)),((2 5,2 4,1 4,2 5)),((8 4,9 5,9 4,8 4)),((6 7,6 6,5 6,5 7,6 7)))";
// Needs original arrival behaviour
static std::string const rt_w29
= "MULTIPOLYGON(((3 7,3 8,4 7,3 7)),((6 5,7 4,5 4,6 5)),((5 4,5 3,4 3,5 4)))";
// Needs to skip the "target ahead" check in is_cc_target_for_union
static std::string const rt_w30
= "MULTIPOLYGON(((6 6,7 7,7 6,6 6)),((8 3,9 3,8.5 2.5,9 2,8 2,8 3)),((4 0,4 1,5 0,4 0)),((0 5,1 6,1 5,0 5)),((3 8,4 9,4 8,3 8)),((7 4,7 5,8 5,7 4)),((7 4,6 3,6 4,7 4)))";
// Like rt_w30, needs to skip the "target ahead" check
static std::string const rt_w31
= "MULTIPOLYGON(((0 1,0 2,1 2,1 1,0 1)),((0 4,0 5,1 5,0 4)),((3 8,4 8,3 7,2 7,3 8)),((3 2,3 3,4 3,3 2)),((0 6,0 7,1 6,0 6)),((0 8,0 9,1 8,0 8)),((4 5,4 4,3 4,3 5,4 5)),((4 5,4 6,5 6,4 5)),((9 3,9 2,8 2,8 3,9 3)),((7 4,7 5,8 5,7 4)),((7 4,6 3,6 4,7 4)),((6 8,7 8,6.5 7.5,7 7,6 7,6 8)),((5 6,5 7,6 6,5 6)))";
static std::string const rt_w32
= "MULTIPOLYGON(((2 8,3 9,3 8,2 8)),((2 8,1 8,1 9,2 8)),((3 6,4 5,3 5,3 6)),((3 6,2 6,2 7,3 6)),((3 8,4 8,4 7,3 7,3 8)),((1 2,0 2,0 3,1 3,1 2)),((1 2,1 1,0 1,1 2)))";
// Reports invalid output for join round - but it is a false negative, because the output is valid.
static std::string const rt_w33
= "MULTIPOLYGON(((4 2,5 3,5 2,4 2)),((2 1,1 1,1 2,2 2,2 1)),((2 1,3 0,2 0,2 1)),((1 2,0 2,0 3,1 3,1 2)))";
// Reports invalid output for join round - but it is a false negative, because the output is valid.
static std::string const rt_w34
= "MULTIPOLYGON(((8 6,8 7,9 6,8 6)),((1 1,1 2,2 2,1 1)),((0 3,1 4,1 3,0 3)),((4 2,5 3,5 2,4 2)))";
// Same as for rt_w33 and rt_w34. The miter variant has a small interior and an inside point which is on the border of many offset rings.
static std::string const rt_w35
= "MULTIPOLYGON(((6 6,6 7,7 7,7 6,6 6)),((5 4,5 5,6 5,6 4,5 4)),((4 0,4 1,5 0,4 0)),((0 0,1 1,1 0,0 0)),((7 0,7 1,8 1,8 0,7 0)),((0 2,0 3,1 3,1 2,0 2)),((3 3,4 2,3 2,3 3)),((3 3,3 4,4 4,4 3,3 3)))";
// Needs checking turns of same cluster in turn_in_piece
// Also it has an interesting shape and several overlapping collinear borders in its rings.
static std::string const rt_w36
= "MULTIPOLYGON(((5 0,6 1,6 0,5 0)),((2 0,2 1,3 0,2 0)),((1 4,1 5,2 4,1 4)),((2 7,3 8,3 7,2 7)),((1 8,1 9,2 9,1 8)),((3 4,3 5,4 5,3 4)),((7.5 4.5,8 5,8 4,7 4,7 5,7.5 4.5)))";
// Needs checking turns of same cluster in turn_in_piece
static std::string const rt_w37
= "MULTIPOLYGON(((5 7,6 8,6 7,5 7)),((1 7,1 8,2 8,1 7)),((1 5,2 6,2 5,1 5)),((1 5,2 4,1 4,1 5)))";
// Needs checking turns of same cluster in turn_in_piece
static std::string const rt_w38
= "MULTIPOLYGON(((8 6,8 7,9 7,9 6,8 6)),((1 3,1 4,2 4,1 3)),((2 3,3 4,3 3,2 3)),((8 3,8 4,9 4,9 3,8 3)),((1 8,1 9,2 8,1 8)),((1 0,1 1,2 0,1 0)),((5 1,5 2,6 1,5 1)),((5 5,5 6,6 6,6 5,5 5)))";
// Needs checking turns of same cluster in turn_in_piece
static std::string const rt_w39
= "MULTIPOLYGON(((1 1,1 2,2 1,1 1)),((3 6,4 7,4 6,3 6)),((1 6,2 7,2 6,1 6)),((1 6,2 5,1 5,1 6)),((1 7,1 8,2 8,1 7)),((7 8,8 7,8 6,7 6,7 8)))";
// Needs checking turns of same cluster in turn_in_piece
static std::string const rt_w40
= "MULTIPOLYGON(((6 8,6 9,7 8,6 8)),((7 6,8 6,8 5,7 4,7 6)),((8 8,8 9,9 9,8 8)),((1 6,2 5,1 5,1 6)),((1 6,2 7,2 6,1 6)),((2 5,2 6,3 6,2 5)),((1 5,2 4,1 4,1 5)))";
#endif
|