mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-01 08:32:10 +00:00
[test][relops] Add spherical Pt/Areal test cases.
This commit is contained in:
@@ -216,6 +216,30 @@ void test_multi_linestring_multi_linestring()
|
||||
false);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
void test_point_polygon()
|
||||
{
|
||||
typedef bg::model::polygon<P> poly;
|
||||
|
||||
// https://svn.boost.org/trac/boost/ticket/9162
|
||||
test_geometry<P, poly>("POINT(0 90)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(-120 21)",
|
||||
"POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
|
||||
false);
|
||||
// extended
|
||||
test_geometry<P, poly>("POINT(0 -90)",
|
||||
"POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(0 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(-180 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
}
|
||||
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
@@ -232,6 +256,8 @@ void test_all()
|
||||
test_linestring_linestring<P>();
|
||||
test_linestring_multi_linestring<P>();
|
||||
test_multi_linestring_multi_linestring<P>();
|
||||
|
||||
test_point_polygon<P>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -214,6 +214,30 @@ void test_multi_linestring_multi_linestring()
|
||||
false);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
void test_point_polygon()
|
||||
{
|
||||
typedef bg::model::polygon<P> poly;
|
||||
|
||||
// https://svn.boost.org/trac/boost/ticket/9162
|
||||
test_geometry<P, poly>("POINT(0 90)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
false);
|
||||
test_geometry<P, poly>("POINT(-120 21)",
|
||||
"POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
|
||||
true);
|
||||
// extended
|
||||
test_geometry<P, poly>("POINT(0 -90)",
|
||||
"POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
|
||||
false);
|
||||
test_geometry<P, poly>("POINT(0 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
false);
|
||||
test_geometry<P, poly>("POINT(-180 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
@@ -230,6 +254,8 @@ void test_all()
|
||||
test_linestring_linestring<P>();
|
||||
test_linestring_multi_linestring<P>();
|
||||
test_multi_linestring_multi_linestring<P>();
|
||||
|
||||
test_point_polygon<P>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -212,6 +212,30 @@ void test_multi_linestring_multi_linestring()
|
||||
true);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
void test_point_polygon()
|
||||
{
|
||||
typedef bg::model::polygon<P> poly;
|
||||
|
||||
// https://svn.boost.org/trac/boost/ticket/9162
|
||||
test_geometry<P, poly>("POINT(0 90)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(-120 21)",
|
||||
"POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
|
||||
false);
|
||||
// extended
|
||||
test_geometry<P, poly>("POINT(0 -90)",
|
||||
"POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(0 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(-180 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
}
|
||||
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
@@ -228,6 +252,8 @@ void test_all()
|
||||
test_linestring_linestring<P>();
|
||||
test_linestring_multi_linestring<P>();
|
||||
test_multi_linestring_multi_linestring<P>();
|
||||
|
||||
test_point_polygon<P>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -216,6 +216,30 @@ void test_multi_linestring_multi_linestring()
|
||||
false);
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
void test_point_polygon()
|
||||
{
|
||||
typedef bg::model::polygon<P> poly;
|
||||
|
||||
// https://svn.boost.org/trac/boost/ticket/9162
|
||||
test_geometry<P, poly>("POINT(0 90)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(-120 21)",
|
||||
"POLYGON((30 0,30 30,90 30, 90 0, 30 0))",
|
||||
false);
|
||||
// extended
|
||||
test_geometry<P, poly>("POINT(0 -90)",
|
||||
"POLYGON((0 -80,90 -80, -180 -80, -90 -80, 0 -80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(0 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
test_geometry<P, poly>("POINT(-180 89)",
|
||||
"POLYGON((0 80,-90 80, -180 80, 90 80, 0 80))",
|
||||
true);
|
||||
}
|
||||
|
||||
|
||||
template <typename P>
|
||||
void test_all()
|
||||
@@ -232,6 +256,8 @@ void test_all()
|
||||
test_linestring_linestring<P>();
|
||||
test_linestring_multi_linestring<P>();
|
||||
test_multi_linestring_multi_linestring<P>();
|
||||
|
||||
test_point_polygon<P>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user