[test] Alter buffer and douglas_peucker tests.

This commit is contained in:
Adam Wulkiewicz 2021-03-02 00:50:14 +01:00
parent 26a62a24fe
commit d6a44a6601
2 changed files with 17 additions and 15 deletions

View File

@ -3,8 +3,8 @@
// Copyright (c) 2010-2019 Barend Gehrels, Amsterdam, the Netherlands.
// This file was modified by Oracle on 2016-2020.
// Modifications copyright (c) 2016-2020, Oracle and/or its affiliates.
// This file was modified by Oracle on 2016-2021.
// Modifications copyright (c) 2016-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// 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,
ut_settings const& settings = ut_settings())
{
typename bg::strategies::relate::services::default_strategy
typename bg::strategies::buffer::services::default_strategy
<
Geometry, Geometry
>::type strategy;
Geometry
>::type strategies;
test_buffer<GeometryOut>(caseid, buffered, geometry,
join_strategy, end_strategy, distance_strategy, side_strategy, point_strategy,
strategy,
strategies,
-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)
? distance_left : distance_right);
typename bg::strategies::relate::services::default_strategy
typename bg::strategies::buffer::services::default_strategy
<
Geometry, Geometry
>::type strategy;
Geometry
>::type strategies;
bg::model::multi_polygon<GeometryOut> buffered;
test_buffer<GeometryOut>
(caseid, buffered, g,
join_strategy, end_strategy,
distance_strategy, side_strategy, circle_strategy,
strategy,
strategies,
expected_count, expected_holes_count, expected_area,
settings);
@ -454,7 +454,7 @@ void test_one(std::string const& caseid, std::string const& wkt,
(caseid + "_sym", buffered, g,
join_strategy, end_strategy,
sym_distance_strategy, side_strategy, circle_strategy,
strategy,
strategies,
expected_count, expected_holes_count, expected_area,
settings);

View File

@ -1,9 +1,10 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// 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 Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
@ -37,6 +38,7 @@
#include <boost/geometry/algorithms/comparable_distance.hpp>
#include <boost/geometry/algorithms/equals.hpp>
#include <boost/geometry/algorithms/simplify.hpp>
#include <boost/geometry/io/wkt/wkt.hpp>
#include <boost/geometry/io/dsv/write.hpp>
@ -74,7 +76,7 @@ struct default_simplify_strategy
bg::point_tag, bg::segment_tag, point_type
>::type default_distance_strategy_type;
typedef bg::strategy::simplify::douglas_peucker
typedef bg::detail::simplify::douglas_peucker
<
point_type, default_distance_strategy_type
> type;
@ -85,7 +87,7 @@ template <typename CoordinateType>
struct simplify_regular_distance_strategy
{
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
> type;
@ -95,7 +97,7 @@ template <typename CoordinateType>
struct simplify_comparable_distance_strategy
{
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
> type;