mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-12 05:51:47 +00:00
[test] Alter buffer and douglas_peucker tests.
This commit is contained in:
parent
26a62a24fe
commit
d6a44a6601
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
// Copyright (c) 2010-2019 Barend Gehrels, Amsterdam, the Netherlands.
|
// Copyright (c) 2010-2019 Barend Gehrels, Amsterdam, the Netherlands.
|
||||||
|
|
||||||
// This file was modified by Oracle on 2016-2020.
|
// This file was modified by Oracle on 2016-2021.
|
||||||
// Modifications copyright (c) 2016-2020, Oracle and/or its affiliates.
|
// Modifications copyright (c) 2016-2021, Oracle and/or its affiliates.
|
||||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||||
|
|
||||||
// Use, modification and distribution is subject to the Boost Software License,
|
// Use, modification and distribution is subject to the Boost Software License,
|
||||||
@ -367,14 +367,14 @@ void test_buffer(std::string const& caseid, bg::model::multi_polygon<GeometryOut
|
|||||||
expectation_limits const& expected_area,
|
expectation_limits const& expected_area,
|
||||||
ut_settings const& settings = ut_settings())
|
ut_settings const& settings = ut_settings())
|
||||||
{
|
{
|
||||||
typename bg::strategies::relate::services::default_strategy
|
typename bg::strategies::buffer::services::default_strategy
|
||||||
<
|
<
|
||||||
Geometry, Geometry
|
Geometry
|
||||||
>::type strategy;
|
>::type strategies;
|
||||||
|
|
||||||
test_buffer<GeometryOut>(caseid, buffered, geometry,
|
test_buffer<GeometryOut>(caseid, buffered, geometry,
|
||||||
join_strategy, end_strategy, distance_strategy, side_strategy, point_strategy,
|
join_strategy, end_strategy, distance_strategy, side_strategy, point_strategy,
|
||||||
strategy,
|
strategies,
|
||||||
-1, -1, expected_area, settings);
|
-1, -1, expected_area, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -423,17 +423,17 @@ void test_one(std::string const& caseid, std::string const& wkt,
|
|||||||
bg::math::equals(distance_right, same_distance)
|
bg::math::equals(distance_right, same_distance)
|
||||||
? distance_left : distance_right);
|
? distance_left : distance_right);
|
||||||
|
|
||||||
typename bg::strategies::relate::services::default_strategy
|
typename bg::strategies::buffer::services::default_strategy
|
||||||
<
|
<
|
||||||
Geometry, Geometry
|
Geometry
|
||||||
>::type strategy;
|
>::type strategies;
|
||||||
|
|
||||||
bg::model::multi_polygon<GeometryOut> buffered;
|
bg::model::multi_polygon<GeometryOut> buffered;
|
||||||
test_buffer<GeometryOut>
|
test_buffer<GeometryOut>
|
||||||
(caseid, buffered, g,
|
(caseid, buffered, g,
|
||||||
join_strategy, end_strategy,
|
join_strategy, end_strategy,
|
||||||
distance_strategy, side_strategy, circle_strategy,
|
distance_strategy, side_strategy, circle_strategy,
|
||||||
strategy,
|
strategies,
|
||||||
expected_count, expected_holes_count, expected_area,
|
expected_count, expected_holes_count, expected_area,
|
||||||
settings);
|
settings);
|
||||||
|
|
||||||
@ -454,7 +454,7 @@ void test_one(std::string const& caseid, std::string const& wkt,
|
|||||||
(caseid + "_sym", buffered, g,
|
(caseid + "_sym", buffered, g,
|
||||||
join_strategy, end_strategy,
|
join_strategy, end_strategy,
|
||||||
sym_distance_strategy, side_strategy, circle_strategy,
|
sym_distance_strategy, side_strategy, circle_strategy,
|
||||||
strategy,
|
strategies,
|
||||||
expected_count, expected_holes_count, expected_area,
|
expected_count, expected_holes_count, expected_area,
|
||||||
settings);
|
settings);
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||||
// Unit Test
|
// Unit Test
|
||||||
|
|
||||||
// Copyright (c) 2015, Oracle and/or its affiliates.
|
// Copyright (c) 2015-2021, Oracle and/or its affiliates.
|
||||||
|
|
||||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||||
|
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||||
|
|
||||||
// Licensed under the Boost Software License version 1.0.
|
// Licensed under the Boost Software License version 1.0.
|
||||||
// http://www.boost.org/users/license.html
|
// http://www.boost.org/users/license.html
|
||||||
@ -37,6 +38,7 @@
|
|||||||
|
|
||||||
#include <boost/geometry/algorithms/comparable_distance.hpp>
|
#include <boost/geometry/algorithms/comparable_distance.hpp>
|
||||||
#include <boost/geometry/algorithms/equals.hpp>
|
#include <boost/geometry/algorithms/equals.hpp>
|
||||||
|
#include <boost/geometry/algorithms/simplify.hpp>
|
||||||
|
|
||||||
#include <boost/geometry/io/wkt/wkt.hpp>
|
#include <boost/geometry/io/wkt/wkt.hpp>
|
||||||
#include <boost/geometry/io/dsv/write.hpp>
|
#include <boost/geometry/io/dsv/write.hpp>
|
||||||
@ -74,7 +76,7 @@ struct default_simplify_strategy
|
|||||||
bg::point_tag, bg::segment_tag, point_type
|
bg::point_tag, bg::segment_tag, point_type
|
||||||
>::type default_distance_strategy_type;
|
>::type default_distance_strategy_type;
|
||||||
|
|
||||||
typedef bg::strategy::simplify::douglas_peucker
|
typedef bg::detail::simplify::douglas_peucker
|
||||||
<
|
<
|
||||||
point_type, default_distance_strategy_type
|
point_type, default_distance_strategy_type
|
||||||
> type;
|
> type;
|
||||||
@ -85,7 +87,7 @@ template <typename CoordinateType>
|
|||||||
struct simplify_regular_distance_strategy
|
struct simplify_regular_distance_strategy
|
||||||
{
|
{
|
||||||
typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
|
typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
|
||||||
typedef bg::strategy::simplify::douglas_peucker
|
typedef bg::detail::simplify::douglas_peucker
|
||||||
<
|
<
|
||||||
point_type, distance_strategy_type
|
point_type, distance_strategy_type
|
||||||
> type;
|
> type;
|
||||||
@ -95,7 +97,7 @@ template <typename CoordinateType>
|
|||||||
struct simplify_comparable_distance_strategy
|
struct simplify_comparable_distance_strategy
|
||||||
{
|
{
|
||||||
typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
|
typedef bg::model::point<CoordinateType, 2, bg::cs::cartesian> point_type;
|
||||||
typedef bg::strategy::simplify::douglas_peucker
|
typedef bg::detail::simplify::douglas_peucker
|
||||||
<
|
<
|
||||||
point_type, comparable_distance_strategy_type
|
point_type, comparable_distance_strategy_type
|
||||||
> type;
|
> type;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user