mirror of
https://github.com/boostorg/geometry.git
synced 2026-01-26 18:42:12 +00:00
[buffer] support degenerate linestrings containing one point. In that
case point-buffer is applied. Including updated unit tests
This commit is contained in:
@@ -15,6 +15,11 @@ static std::string const simplex = "MULTILINESTRING((0 0,4 5),(5 4,10 0))";
|
||||
static std::string const two_bends = "MULTILINESTRING((0 0,4 5,7 4,10 6),(1 5,5 9,8 6))";
|
||||
static std::string const turn_inside = "MULTILINESTRING((0 0,4 5,7 4,10 6),(1 5,5 9,8 6),(0 4,-2 6))";
|
||||
|
||||
static std::string const degenerate0 = "MULTILINESTRING()";
|
||||
static std::string const degenerate1 = "MULTILINESTRING((5 5))";
|
||||
static std::string const degenerate2 = "MULTILINESTRING((5 5),(9 9))";
|
||||
static std::string const degenerate3 = "MULTILINESTRING((5 5),(9 9),(4 10))";
|
||||
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
@@ -49,6 +54,11 @@ void test_all()
|
||||
test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_round_by_divide, end_flat, 64.6217, 1.5, 1.5);
|
||||
test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_miter, end_flat, 65.1834, 1.5, 1.5);
|
||||
test_one<multi_linestring_type, polygon>("two_bends", two_bends, join_miter, end_round, 75.2917, 1.5, 1.5);
|
||||
|
||||
test_one<multi_linestring_type, polygon>("degenerate0", degenerate0, join_round, end_round, 0.0, 3.0, 3.0);
|
||||
test_one<multi_linestring_type, polygon>("degenerate1", degenerate1, join_round, end_round, 28.2503, 3.0, 3.0);
|
||||
test_one<multi_linestring_type, polygon>("degenerate2", degenerate2, join_round, end_round, 56.0457, 3.0, 3.0);
|
||||
test_one<multi_linestring_type, polygon>("degenerate3", degenerate3, join_round, end_round, 80.4531, 3.0, 3.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user