mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-10 07:34:03 +00:00
[geometry] reorganized buffer strategies (unit tests)
[SVN r83273]
This commit is contained in:
parent
ce3e4e858e
commit
6ffb28d6ae
@ -164,8 +164,10 @@ void test_all()
|
||||
|
||||
test_one<linestring, buf::join_round, polygon>("one_bend", one_bend, 'r', 28.488, 1.5, 1.5);
|
||||
test_one<linestring, buf::join_miter, polygon>("one_bend", one_bend, 'm', 28.696, 1.5, 1.5);
|
||||
test_one<linestring, buf::join_round_by_divide, polygon>("one_bend", one_bend, 'd', 28.488, 1.5, 1.5);
|
||||
|
||||
test_one<linestring, buf::join_round, polygon>("two_bends", two_bends, 'r', 39.222, 1.5, 1.5);
|
||||
test_one<linestring, buf::join_round, polygon>("two_bends", two_bends, 'r', 39.235, 1.5, 1.5);
|
||||
test_one<linestring, buf::join_round_by_divide, polygon>("two_bends", two_bends, 'd', 39.235, 1.5, 1.5);
|
||||
test_one<linestring, buf::join_miter, polygon>("two_bends", two_bends, 'm', 39.513, 1.5, 1.5);
|
||||
test_one<linestring, buf::join_round, polygon>("two_bends_left", two_bends, 'r', 20.028, 1.5, 0.0);
|
||||
test_one<linestring, buf::join_miter, polygon>("two_bends_left", two_bends, 'm', 20.225, 1.5, 0.0);
|
||||
|
@ -34,6 +34,7 @@ void test_all()
|
||||
|
||||
test_one<multi_linestring_type, buf::join_round, polygon>("simplex", simplex, 'r', 38.2623, 1.5, 1.5);
|
||||
test_one<multi_linestring_type, buf::join_round, polygon>("two_bends", two_bends, 'r', 64.6217, 1.5, 1.5);
|
||||
test_one<multi_linestring_type, buf::join_round_by_divide, polygon>("two_bends", two_bends, 'd', 64.6217, 1.5, 1.5);
|
||||
test_one<multi_linestring_type, buf::join_miter, polygon>("two_bends", two_bends, 'm', 65.1834, 1.5, 1.5);
|
||||
test_one<multi_linestring_type, buf::join_round, polygon>("two_bends_asym", two_bends, 'm', 52.3793, 1.5, 0.75);
|
||||
}
|
||||
|
@ -253,6 +253,7 @@ void test_all()
|
||||
test_one<multi_polygon_type, buf::join_miter, polygon_type>("multi_simplex_20", simplex, 'm', 77.7060, 2.0);
|
||||
test_one<multi_polygon_type, buf::join_round, polygon_type>("multi_simplex_50", simplex, 'r', 174.46, 5.0);
|
||||
test_one<multi_polygon_type, buf::join_miter, polygon_type>("multi_simplex_50", simplex, 'm', 298.797, 5.0);
|
||||
test_one<multi_polygon_type, buf::join_round_by_divide, polygon_type>("multi_simplex_50", simplex, 'd', 174.46, 5.0);
|
||||
|
||||
test_one<multi_polygon_type, buf::join_round, polygon_type>("zonethru_05", zonethru, 'r', 67.4627, 0.5);
|
||||
test_one<multi_polygon_type, buf::join_miter, polygon_type>("zonethru_05", zonethru, 'm', 68.0000, 0.5);
|
||||
|
@ -85,15 +85,18 @@ void test_buffer(std::string const& caseid, Geometry const& geometry,
|
||||
|
||||
typedef typename bg::coordinate_type<Geometry>::type coordinate_type;
|
||||
typedef typename bg::point_type<Geometry>::type point_type;
|
||||
typedef bg::strategy::buffer::distance_assymetric<coordinate_type> distance;
|
||||
typedef bg::strategy::buffer::distance_asymmetric<coordinate_type> distance;
|
||||
|
||||
typedef typename bg::ring_type<GeometryOut>::type ring_type;
|
||||
|
||||
typedef typename bg::tag<Geometry>::type tag;
|
||||
// TODO use something different here:
|
||||
std::string type = boost::is_same<tag, bg::polygon_tag>::value ? "poly"
|
||||
: boost::is_same<tag, bg::linestring_tag>::value ? "line"
|
||||
: boost::is_same<tag, bg::point_tag>::value ? "point"
|
||||
: boost::is_same<tag, bg::multi_polygon_tag>::value ? "multipoly"
|
||||
: boost::is_same<tag, bg::multi_linestring_tag>::value ? "multiline"
|
||||
: boost::is_same<tag, bg::multi_point_tag>::value ? "multipoint"
|
||||
: ""
|
||||
;
|
||||
|
||||
@ -138,7 +141,7 @@ void test_buffer(std::string const& caseid, Geometry const& geometry,
|
||||
|
||||
join_strategy_type join_strategy;
|
||||
|
||||
typedef bg::strategy::buffer::distance_assymetric<coordinate_type> distance_strategy_type;
|
||||
typedef bg::strategy::buffer::distance_asymmetric<coordinate_type> distance_strategy_type;
|
||||
distance_strategy_type distance_strategy(distance_left, distance_right);
|
||||
|
||||
std::vector<GeometryOut> buffered;
|
||||
|
Loading…
x
Reference in New Issue
Block a user