mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-23 15:52:09 +00:00
[CONFIG] Use a positive define (USE_RESCALING) instead of an unclear negative
one (NO_ROBUSTNESS). Precedes removing of the rescaling.
This commit is contained in:
@@ -134,7 +134,7 @@ void test_one(std::string const& caseid, std::string const& wkt, double expected
|
||||
|
||||
settings.tolerance = 10000.0;
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// in case robustness policies are changed, areas should be adapted
|
||||
settings.tolerance = boost::starts_with(caseid, "no") ? 200000.0 : 100000.0;
|
||||
#endif
|
||||
|
||||
@@ -141,7 +141,7 @@ void test_all()
|
||||
}
|
||||
|
||||
{
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// Coordinates in one linestring vary so much that
|
||||
// length = geometry::math::sqrt(dx * dx + dy * dy); returns a value of inf for length
|
||||
// That geometry is skipped for the buffer
|
||||
@@ -173,7 +173,7 @@ void test_all()
|
||||
mysql_23023665_1, join_round32, end_round32, 1, 1, 186.5504, 1.0);
|
||||
test_one<multi_linestring_type, polygon>("touching1_1",
|
||||
touching1, join_round32, end_round32, 2, 0, 78.70773, 1.0
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
, ut_settings::ignore_validity() // false positive, due to rescaling. As we remove it, it is gone
|
||||
#endif
|
||||
);
|
||||
@@ -199,7 +199,7 @@ void test_all()
|
||||
test_one<multi_linestring_type, polygon>("mysql_23023665_1_20",
|
||||
mysql_23023665_1, join_round32, end_flat, 1, 1, 350.1135, 2.0);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
{
|
||||
ut_settings settings(10.0);
|
||||
test_one<multi_linestring_type, polygon>("ticket_13444_1",
|
||||
|
||||
@@ -47,7 +47,7 @@ void test_all()
|
||||
test_one<multi_point_type, polygon>("simplex3", simplex, join, end_flat, 44.5692, 3.0);
|
||||
|
||||
test_one<multi_point_type, polygon>("three1", three, join, end_flat, 3.0 * pi, 1.0);
|
||||
#if !defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// For no-rescaling, fails in CCW mode
|
||||
test_one<multi_point_type, polygon>("three2", three, join, end_flat, 36.7592, 2.0);
|
||||
#endif
|
||||
@@ -122,7 +122,7 @@ void test_many_points_per_circle()
|
||||
|
||||
using bg::strategy::buffer::point_circle;
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
double const tolerance = 1000.0;
|
||||
#else
|
||||
double const tolerance = 1.0;
|
||||
|
||||
@@ -371,7 +371,7 @@ void test_all()
|
||||
test_one<multi_polygon_type, polygon_type>("rt_g1", rt_g1, join_round, end_flat, 24.719, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_g3", rt_g3, join_miter, end_flat, 16.5711, 1.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_d", rt_d, join_miter, end_flat, 19.8823, 0.3);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_e", rt_e, join_miter, end_flat, 15.1198, 0.3);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_f", rt_f, join_miter, end_flat, 4.60853, 0.3);
|
||||
@@ -388,7 +388,7 @@ void test_all()
|
||||
test_one<multi_polygon_type, polygon_type>("rt_k", rt_k, join_round, end_flat, 42.0092, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_k", rt_k, join_miter, end_flat, 48.0563, 1.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_l", rt_l, join_miter, end_flat, 19.3995, 1.0);
|
||||
#endif
|
||||
|
||||
@@ -400,7 +400,7 @@ void test_all()
|
||||
|
||||
test_one<multi_polygon_type, polygon_type>("rt_o1", rt_o1, join_round, end_flat, 17.536, 1.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_o1", rt_o1, join_miter, end_flat, 20.9142, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_o2", rt_o2, join_miter, end_flat, 25.7426, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_o3", rt_o3, join_miter, end_flat, 28.8247, 1.0);
|
||||
@@ -412,7 +412,7 @@ void test_all()
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p3", rt_p3, join_miter, end_flat, 22.3995, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p4", rt_p4, join_miter, end_flat, 33.0563, 1.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p5", rt_p5, join_miter, end_flat, 17.0, 1.0);
|
||||
#endif
|
||||
|
||||
@@ -429,7 +429,7 @@ void test_all()
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p15", rt_p15, join_miter, end_flat, 23.6569, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p16", rt_p16, join_miter, end_flat, 23.4853, 1.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p17", rt_p17, join_miter, end_flat, 25.3137, 1.0);
|
||||
#endif
|
||||
|
||||
@@ -437,7 +437,7 @@ void test_all()
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p19", rt_p19, join_miter, end_flat, 25.5637, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p20", rt_p20, join_miter, end_flat, 25.4853, 1.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_p21", rt_p21, join_miter, end_flat, 17.1716, 1.0);
|
||||
#endif
|
||||
|
||||
@@ -447,14 +447,14 @@ void test_all()
|
||||
test_one<multi_polygon_type, polygon_type>("rt_q2", rt_q2, join_miter, end_flat, 26.4853, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_q2", rt_q2, join_miter, end_flat, 0.9697, -0.25);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_r", rt_r, join_miter, end_flat, 21.0761, 1.0);
|
||||
#endif
|
||||
|
||||
test_one<multi_polygon_type, polygon_type>("rt_s1", rt_s1, join_miter, end_flat, 20.4853, 1.0);
|
||||
test_one<multi_polygon_type, polygon_type>("rt_s2", rt_s2, join_miter, end_flat, 24.6495, 1.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<multi_polygon_type, polygon_type>("rt_t1", rt_t, join_miter, end_flat, 15.6569, 1.0);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ void test_all()
|
||||
test_one<polygon_type, polygon_type>("snake4", snake, join_miter, end_flat, 64.44, 0.4);
|
||||
test_one<polygon_type, polygon_type>("snake5", snake, join_miter, end_flat, 72, 0.5);
|
||||
test_one<polygon_type, polygon_type>("snake6", snake, join_miter, end_flat, 75.44, 0.6);
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<polygon_type, polygon_type>("snake16", snake, join_miter, end_flat, 114.24, 1.6);
|
||||
#endif
|
||||
|
||||
@@ -508,7 +508,7 @@ void test_all()
|
||||
test_one<polygon_type, polygon_type>("parcel1_20", parcel1, join_round, end_flat, 209.3579, -20.0);
|
||||
test_one<polygon_type, polygon_type>("parcel1_20", parcel1, join_miter, end_flat, 188.4224, -20.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<polygon_type, polygon_type>("nl_part1_2", nl_part1, join_round, end_flat, 1848737356.991, -0.2 * 1000.0);
|
||||
test_one<polygon_type, polygon_type>("nl_part1_5", nl_part1, join_round, end_flat, 1775953811.679, -0.5 * 1000.0);
|
||||
#else
|
||||
@@ -516,7 +516,7 @@ void test_all()
|
||||
test_one<polygon_type, polygon_type>("nl_part1_5", nl_part1, join_round, end_flat, 1775953824.799, -0.5 * 1000.0);
|
||||
#endif
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<polygon_type, polygon_type>("italy_part1_30", italy_part1, join_round, end_flat, 5015638814.956, 30.0 * 1000.0);
|
||||
test_one<polygon_type, polygon_type>("italy_part1_50", italy_part1, join_round, end_flat, 11363180044.822, 50.0 * 1000.0);
|
||||
#else
|
||||
|
||||
@@ -373,8 +373,8 @@ void test_overlay(std::string const& caseid,
|
||||
<< "_" << string_from_type<typename bg::coordinate_type<Geometry>::type>::name()
|
||||
<< (ccw ? "_ccw" : "")
|
||||
<< (open ? "_open" : "")
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
<< "_no_rob"
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
<< "_rescaled"
|
||||
#endif
|
||||
<< ".svg";
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ void test_all()
|
||||
typedef typename bg::coordinate_type<P>::type ct;
|
||||
|
||||
ut_settings sym_settings;
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
sym_settings.sym_difference = false;
|
||||
#endif
|
||||
|
||||
@@ -263,7 +263,7 @@ void test_all()
|
||||
1, 61, 10.2717,
|
||||
1, 61, 10.2717);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
if ( BOOST_GEOMETRY_CONDITION((boost::is_same<ct, double>::value)) )
|
||||
{
|
||||
test_one<polygon, polygon, polygon>("buffer_mp2",
|
||||
@@ -287,7 +287,7 @@ void test_all()
|
||||
|
||||
{
|
||||
ut_settings settings;
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
settings.percentage = 0.1;
|
||||
settings.test_validity = false;
|
||||
#else
|
||||
@@ -371,7 +371,7 @@ void test_all()
|
||||
1, -1, 35723.8506317139 + 58456.4964294434);
|
||||
}
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
{
|
||||
// symmetric difference is not valid due to robustness issue, it has
|
||||
// two turns (touch_only) and a midpoint is located in other polygon
|
||||
@@ -392,7 +392,7 @@ void test_all()
|
||||
1, 5, 384.2295081964694,
|
||||
tolerance(0.01));
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// 2011-07-02 / 2014-06-19
|
||||
// Interesting FP-precision case.
|
||||
// sql server gives: 6.62295817619452E-05
|
||||
@@ -423,7 +423,7 @@ void test_all()
|
||||
1, 10, 10.03103292,
|
||||
0, 0, 0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<polygon, polygon, polygon>("ticket_9081_15",
|
||||
ticket_9081_15[0], ticket_9081_15[1],
|
||||
2, 10, 0.0334529710902111,
|
||||
@@ -435,7 +435,7 @@ void test_all()
|
||||
2, 12, 0.0451236449624935,
|
||||
0, 0, 0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<polygon, polygon, polygon>("ticket_9563",
|
||||
ticket_9563[0], ticket_9563[1],
|
||||
0, 0, 0,
|
||||
@@ -448,7 +448,7 @@ void test_all()
|
||||
1, 4, 0.029019232,
|
||||
sym_settings);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<polygon, polygon, polygon>("ticket_10108_b",
|
||||
ticket_10108_b[0], ticket_10108_b[1],
|
||||
1, 5, 1081.68697,
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
// If defined, tests are run without rescaling-to-integer or robustness policy
|
||||
// Test which would fail then are disabled automatically
|
||||
// #define BOOST_GEOMETRY_NO_ROBUSTNESS
|
||||
|
||||
#include <boost/geometry/algorithms/correct.hpp>
|
||||
#include <boost/geometry/algorithms/is_valid.hpp>
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ void test_areal()
|
||||
{
|
||||
ut_settings settings;
|
||||
|
||||
#if !defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
settings.sym_difference = false;
|
||||
#endif
|
||||
|
||||
@@ -154,7 +154,7 @@ void test_areal()
|
||||
TEST_DIFFERENCE_WITH(0, 1, ggl_list_20120221_volker, 2, 7962.66, 2, 2775258.93, 4);
|
||||
}
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
{
|
||||
ut_settings settings;
|
||||
settings.sym_difference = false; // Validity problem in sym difference
|
||||
@@ -166,7 +166,7 @@ void test_areal()
|
||||
// With no-robustness this one misses one of the outputs
|
||||
ut_settings settings;
|
||||
settings.percentage = 0.001; // tolerance
|
||||
#if !defined(BOOST_GEOMETRY_NO_ROBUSTNESS) && !defined(BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING) && !defined(BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS)
|
||||
settings.test_validity = false;
|
||||
#endif
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
|
||||
@@ -343,7 +343,7 @@ void test_areal()
|
||||
TEST_DIFFERENCE(case_recursive_boxes_78, 11, 5.5, 8, 4.5, 14);
|
||||
TEST_DIFFERENCE(case_recursive_boxes_79, 2, 1.25, 6, 4.5, 8);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
TEST_DIFFERENCE(case_recursive_boxes_80, 1, 0.5, 2, 0.75, 2);
|
||||
#else
|
||||
// one polygon is divided into two, for same reason as union creates a small
|
||||
@@ -355,7 +355,7 @@ void test_areal()
|
||||
TEST_DIFFERENCE(case_recursive_boxes_82, 5, 7.25, 7, 4.5, 8);
|
||||
TEST_DIFFERENCE(case_recursive_boxes_83, 9, 5.25, 8, 5.25, 12);
|
||||
TEST_DIFFERENCE(case_recursive_boxes_84, 4, 8.0, 7, 9.0, 4);
|
||||
#ifdef BOOST_GEOMETRY_NO_ROBUSTNESS
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
TEST_DIFFERENCE(case_recursive_boxes_85, 4, 4.0, 7, 3.75, 9);
|
||||
#endif
|
||||
|
||||
@@ -370,7 +370,7 @@ void test_areal()
|
||||
|
||||
{
|
||||
ut_settings sym_settings;
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
sym_settings.sym_difference = false;
|
||||
#endif
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("mysql_21965285_b",
|
||||
@@ -381,7 +381,7 @@ void test_areal()
|
||||
sym_settings);
|
||||
}
|
||||
|
||||
#ifdef BOOST_GEOMETRY_NO_ROBUSTNESS
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
TEST_DIFFERENCE(mysql_regression_1_65_2017_08_31, 0, 0.0, 3, 152.0642, 3);
|
||||
#else
|
||||
TEST_DIFFERENCE(mysql_regression_1_65_2017_08_31, 1, 4.30697514e-7, 3, 152.0642, 4);
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
// If defined, tests are run without rescaling-to-integer or robustness policy
|
||||
// This multi_difference currently contains no tests for double which then fail
|
||||
// #define BOOST_GEOMETRY_NO_ROBUSTNESS
|
||||
|
||||
//#define HAVE_TTMATH
|
||||
//#define BOOST_GEOMETRY_DEBUG_ASSEMBLE
|
||||
//#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
|
||||
|
||||
@@ -105,8 +105,8 @@ void difference_output(std::string const& caseid, G1 const& g1, G2 const& g2, Ou
|
||||
<< string_from_type<coordinate_type>::name()
|
||||
<< (ccw ? "_ccw" : "")
|
||||
<< (open ? "_open" : "")
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
<< "_no_rob"
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
<< "_rescaled"
|
||||
#endif
|
||||
<< ".svg";
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ void test_areal()
|
||||
{
|
||||
ut_settings settings(if_typed_tt<ct>(0.01, 0.1));
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
settings.test_validity = false;
|
||||
#endif
|
||||
|
||||
@@ -203,7 +203,7 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("geos_2", geos_2[0], geos_2[1],
|
||||
0, 0, 6.0e-5, ut_settings(-1.0)); // -1 denotes: compare with <=
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("geos_3",
|
||||
geos_3[0], geos_3[1],
|
||||
0, 0, 0.0);
|
||||
@@ -233,14 +233,14 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("ggl_list_20110307_javier",
|
||||
ggl_list_20110307_javier[0], ggl_list_20110307_javier[1],
|
||||
1, 4,
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
0.40
|
||||
#else
|
||||
0.397162651, ut_settings(0.01)
|
||||
#endif
|
||||
);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("ggl_list_20110627_phillip",
|
||||
ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
|
||||
1, if_typed_tt<ct>(6, 5), 11151.6618);
|
||||
@@ -263,7 +263,7 @@ void test_areal()
|
||||
ggl_list_20140321_7415963[0], ggl_list_20140321_7415963[1],
|
||||
0, 0, 0, ut_settings(0.1));
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
|
||||
1, 4, 0.00029437899183903937, ut_settings(0.01));
|
||||
|
||||
@@ -293,7 +293,7 @@ void test_areal()
|
||||
ticket_10108_a[0], ticket_10108_a[1],
|
||||
0, 0, 0.0);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// msvc 5.6023011e-5
|
||||
// mingw 5.6022954e-5
|
||||
test_one<Polygon, Polygon, Polygon>("ticket_10108_b",
|
||||
|
||||
@@ -326,14 +326,14 @@ void test_areal()
|
||||
TEST_INTERSECTION(case_recursive_boxes_82, 5, -1, 8.5);
|
||||
TEST_INTERSECTION(case_recursive_boxes_83, 5, -1, 10.25);
|
||||
TEST_INTERSECTION(case_recursive_boxes_84, 1, -1, 0.5);
|
||||
#ifdef BOOST_GEOMETRY_NO_ROBUSTNESS
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
TEST_INTERSECTION(case_recursive_boxes_85, 1, -1, 0.25);
|
||||
#endif
|
||||
TEST_INTERSECTION(case_recursive_boxes_86, 0, -1, 0.0);
|
||||
TEST_INTERSECTION(case_recursive_boxes_87, 0, -1, 0.0);
|
||||
TEST_INTERSECTION(case_recursive_boxes_88, 4, -1, 3.5);
|
||||
|
||||
#ifndef BOOST_GEOMETRY_NO_ROBUSTNESS
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
TEST_INTERSECTION(case_precision_m1, 1, -1, 14.0);
|
||||
TEST_INTERSECTION(case_precision_m2, 2, -1, 15.25);
|
||||
TEST_INTERSECTION_REV(case_precision_m1, 1, -1, 14.0);
|
||||
@@ -364,7 +364,7 @@ void test_areal()
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_11018",
|
||||
ticket_11018[0], ticket_11018[1],
|
||||
1, 4,
|
||||
#ifdef BOOST_GEOMETRY_NO_ROBUSTNESS
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
9.896437631745599e-09
|
||||
#else
|
||||
1.7791170511070893e-14, ut_settings(0.001)
|
||||
|
||||
@@ -115,7 +115,8 @@ check_result(
|
||||
}
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// Without rescaling, point count might easily differ (which is no problem)
|
||||
if (expected_point_count > 0)
|
||||
{
|
||||
BOOST_CHECK_MESSAGE(bg::math::abs(n - expected_point_count) < 3,
|
||||
@@ -256,8 +257,8 @@ typename bg::default_area_result<G1>::type test_intersection(std::string const&
|
||||
<< string_from_type<CalculationType>::name()
|
||||
<< (ccw ? "_ccw" : "")
|
||||
<< (open ? "_open" : "")
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
<< "_no_rob"
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
<< "_rescaled"
|
||||
#endif
|
||||
<< ".svg";
|
||||
|
||||
|
||||
@@ -197,7 +197,8 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
|
||||
<< " type: " << (type_for_assert_message<G1, G2>())
|
||||
);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// Without rescaling, point count might easily differ (which is no problem)
|
||||
BOOST_CHECK_MESSAGE(expected_point_count < 0 || std::abs(int(n) - expected_point_count) < 3,
|
||||
"union: " << caseid
|
||||
<< " #points expected: " << expected_point_count
|
||||
@@ -223,8 +224,8 @@ void test_union(std::string const& caseid, G1 const& g1, G2 const& g2,
|
||||
<< string_from_type<coordinate_type>::name()
|
||||
<< (ccw ? "_ccw" : "")
|
||||
<< (open ? "_open" : "")
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
<< "_no_rob"
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
<< "_rescaled"
|
||||
#endif
|
||||
<< ".svg";
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ void test_areal()
|
||||
ggl_list_20110307_javier[0], ggl_list_20110307_javier[1],
|
||||
1, 1, 13, 20016.4);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("ggl_list_20110627_phillip",
|
||||
ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
|
||||
1, 0, 8, 14729.07145);
|
||||
@@ -334,7 +334,7 @@ void test_areal()
|
||||
ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
|
||||
1, 1, 15, 129904.197692871);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("ggl_list_20110820_christophe",
|
||||
ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1],
|
||||
-1, // Either 1 or 2, depending if the intersection/turn point (eps.region) is missed
|
||||
@@ -346,7 +346,7 @@ void test_areal()
|
||||
{
|
||||
ut_settings settings;
|
||||
settings.percentage = 0.1;
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
settings.test_validity = false;
|
||||
#endif
|
||||
|
||||
@@ -396,7 +396,7 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("ticket_9756", ticket_9756[0], ticket_9756[1],
|
||||
1, 0, 10, if_typed<ct, float>(1291.5469, 1289.08374));
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("ticket_10108_a", ticket_10108_a[0], ticket_10108_a[1],
|
||||
1, 0, 8, 0.0435229);
|
||||
#else
|
||||
@@ -404,7 +404,7 @@ void test_areal()
|
||||
2, 0, 8, 0.0435229);
|
||||
#endif
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("ticket_10108_b", ticket_10108_b[0], ticket_10108_b[1],
|
||||
1, 0, 10, 2424.3449);
|
||||
#endif
|
||||
@@ -433,7 +433,7 @@ void test_areal()
|
||||
1, 0, 265, 19.280667);
|
||||
|
||||
// Robustness issues, followed out buffer-robustness-tests, test them also reverse
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
|
||||
1, 0, -1, 4.60853);
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_f_rev", buffer_rt_f[1], buffer_rt_f[0],
|
||||
@@ -453,7 +453,7 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_j_rev", buffer_rt_j[1], buffer_rt_j[0],
|
||||
1, 0, -1, 16.5711);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_l", buffer_rt_l[0], buffer_rt_l[1],
|
||||
1, 0, -1, 19.3995);
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_l_rev", buffer_rt_l[1], buffer_rt_l[0],
|
||||
@@ -470,7 +470,7 @@ void test_areal()
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_m2_rev", buffer_rt_m2[1], buffer_rt_m2[0],
|
||||
1, 0, 15, 21.4853);
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_q", buffer_rt_q[0], buffer_rt_q[1],
|
||||
1, 0, -1, 18.5710);
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_rt_q_rev", buffer_rt_q[1], buffer_rt_q[0],
|
||||
@@ -489,7 +489,7 @@ void test_areal()
|
||||
1, 0, if_typed_tt<ct>(93, 91), 22.815);
|
||||
|
||||
test_one<Polygon, Polygon, Polygon>("buffer_mp2", buffer_mp2[0], buffer_mp2[1],
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
1, 0, 217, 36.752837);
|
||||
#else
|
||||
1, 1, 217, 36.752837);
|
||||
@@ -580,7 +580,7 @@ int test_main(int, char* [])
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
|
||||
|
||||
#if ! defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
test_all<bg::model::d2::point_xy<float> >();
|
||||
test_all<bg::model::d2::point_xy<long double> >();
|
||||
#endif
|
||||
|
||||
@@ -363,7 +363,7 @@ void test_areal()
|
||||
TEST_UNION(case_recursive_boxes_78, 2, 5, -1, 18.0);
|
||||
TEST_UNION(case_recursive_boxes_79, 1, 2, -1, 14.75);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// This is correct: no holes generated
|
||||
TEST_UNION(case_recursive_boxes_80, 2, 0, -1, 1.5);
|
||||
#else
|
||||
@@ -393,13 +393,13 @@ void test_areal()
|
||||
|
||||
{
|
||||
ut_settings settings;
|
||||
#if !defined(BOOST_GEOMETRY_NO_ROBUSTNESS) && !defined(BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS)
|
||||
#if defined(BOOST_GEOMETRY_USE_RESCALING) && !defined(BOOST_GEOMETRY_TEST_INCLUDE_FAILING_TESTS)
|
||||
settings.test_validity = false;
|
||||
#endif
|
||||
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_9081",
|
||||
ticket_9081[0], ticket_9081[1],
|
||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
3,
|
||||
#else
|
||||
4,
|
||||
@@ -419,7 +419,7 @@ void test_areal()
|
||||
ticket_12118[0], ticket_12118[1],
|
||||
1, 1, 27, 2221.38713);
|
||||
|
||||
#if defined(BOOST_GEOMETRY_ENABLE_FAILING_TESTS) || defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||
#if defined(BOOST_GEOMETRY_ENABLE_FAILING_TESTS) || ! defined(BOOST_GEOMETRY_USE_RESCALING)
|
||||
// No output if rescaling is done
|
||||
test_one<Polygon, MultiPolygon, MultiPolygon>("ticket_12125",
|
||||
ticket_12125[0], ticket_12125[1],
|
||||
|
||||
Reference in New Issue
Block a user