mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-12 14:01:47 +00:00
[test] update settings for validity in intersection, all tests (excluded non-rescaling)
are fine now for this file
This commit is contained in:
parent
ecb87a434b
commit
093f3151bb
@ -46,9 +46,13 @@ BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
|
|||||||
(test_one<Polygon, Polygon, Polygon>) \
|
(test_one<Polygon, Polygon, Polygon>) \
|
||||||
( #caseid, caseid[0], caseid[1], clips, points, area)
|
( #caseid, caseid[0], caseid[1], clips, points, area)
|
||||||
|
|
||||||
#define TEST_INTERSECTION_IGNORE(caseid, clips, points, area) \
|
#if ! defined(BOOST_GEOMETRY_INCLUDE_SELF_TURNS)
|
||||||
(test_one<Polygon, Polygon, Polygon>) \
|
#define TEST_INTERSECTION_IGNORE(caseid, clips, points, area) \
|
||||||
( #caseid, caseid[0], caseid[1], clips, points, area, ignore_validity)
|
{ ut_settings ignore_validity; \
|
||||||
|
ignore_validity.test_validity = false; \
|
||||||
|
(test_one<Polygon, Polygon, Polygon>) \
|
||||||
|
( #caseid, caseid[0], caseid[1], clips, points, area, ignore_validity); }
|
||||||
|
#endif
|
||||||
|
|
||||||
template <typename Polygon>
|
template <typename Polygon>
|
||||||
void test_areal()
|
void test_areal()
|
||||||
@ -57,10 +61,6 @@ void test_areal()
|
|||||||
bool const ccw = bg::point_order<Polygon>::value == bg::counterclockwise;
|
bool const ccw = bg::point_order<Polygon>::value == bg::counterclockwise;
|
||||||
bool const open = bg::closure<Polygon>::value == bg::open;
|
bool const open = bg::closure<Polygon>::value == bg::open;
|
||||||
|
|
||||||
ut_settings ignore_validity;
|
|
||||||
ignore_validity.test_validity = false;
|
|
||||||
|
|
||||||
|
|
||||||
test_one<Polygon, Polygon, Polygon>("simplex_with_empty_1",
|
test_one<Polygon, Polygon, Polygon>("simplex_with_empty_1",
|
||||||
simplex_normal[0], polygon_empty,
|
simplex_normal[0], polygon_empty,
|
||||||
0, 0, 0.0);
|
0, 0, 0.0);
|
||||||
@ -174,20 +174,21 @@ void test_areal()
|
|||||||
pie_2_3_23_0[0], pie_2_3_23_0[1],
|
pie_2_3_23_0[0], pie_2_3_23_0[1],
|
||||||
1, 4, 163292.679042133, ut_settings(0.1));
|
1, 4, 163292.679042133, ut_settings(0.1));
|
||||||
|
|
||||||
|
{
|
||||||
|
ut_settings settings(if_typed_tt<ct>(0.01, 0.1));
|
||||||
|
|
||||||
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
#if defined(BOOST_GEOMETRY_NO_ROBUSTNESS)
|
||||||
test_one<Polygon, Polygon, Polygon>("isovist",
|
settings.test_validity = false;
|
||||||
isovist1[0], isovist1[1],
|
|
||||||
1, 19, 88.4178,
|
|
||||||
ignore_validity);
|
|
||||||
#else
|
|
||||||
// SQL Server gives: 88.1920416352664
|
|
||||||
// PostGIS gives: 88.19203677911
|
|
||||||
test_one<Polygon, Polygon, Polygon>("isovist",
|
|
||||||
isovist1[0], isovist1[1],
|
|
||||||
1, 19, 88.19203,
|
|
||||||
ut_settings(if_typed_tt<ct>(0.01, 0.1)));
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// SQL Server gives: 88.1920416352664
|
||||||
|
// PostGIS gives: 88.19203677911
|
||||||
|
test_one<Polygon, Polygon, Polygon>("isovist",
|
||||||
|
isovist1[0], isovist1[1],
|
||||||
|
1, 19, 88.192037,
|
||||||
|
settings);
|
||||||
|
}
|
||||||
|
|
||||||
test_one<Polygon, Polygon, Polygon>("geos_1",
|
test_one<Polygon, Polygon, Polygon>("geos_1",
|
||||||
geos_1[0], geos_1[1],
|
geos_1[0], geos_1[1],
|
||||||
1, -1, 3461.0214843, // MSVC 14 reports 3461.025390625
|
1, -1, 3461.0214843, // MSVC 14 reports 3461.025390625
|
||||||
@ -346,8 +347,13 @@ void test_areal()
|
|||||||
case_102[0], case_102[1],
|
case_102[0], case_102[1],
|
||||||
0, -1, 3.1875);
|
0, -1, 3.1875);
|
||||||
|
|
||||||
|
#ifdef BOOST_GEOMETRY_INCLUDE_SELF_TURNS
|
||||||
|
TEST_INTERSECTION(case_103, 2, -1, 3.5);
|
||||||
|
TEST_INTERSECTION(case_104, 3, -1, 3.0);
|
||||||
|
#else
|
||||||
TEST_INTERSECTION_IGNORE(case_103, 0, -1, 3.5);
|
TEST_INTERSECTION_IGNORE(case_103, 0, -1, 3.5);
|
||||||
TEST_INTERSECTION_IGNORE(case_104, 0, -1, 3.0);
|
TEST_INTERSECTION_IGNORE(case_104, 0, -1, 3.0);
|
||||||
|
#endif
|
||||||
|
|
||||||
test_one<Polygon, Polygon, Polygon>("mysql_21964049",
|
test_one<Polygon, Polygon, Polygon>("mysql_21964049",
|
||||||
mysql_21964049[0], mysql_21964049[1],
|
mysql_21964049[0], mysql_21964049[1],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user