Test cases for PreparedGeometry predicates using polygons as input
org.locationtech.jtstest.geomop.PreparedGeometryOperation
A/P - point equal to start point of polygon
POLYGON ((10 10, 60 100, 110 10, 10 10))
POINT (10 10)
false
true
true
A/P - point equal to start point of polygon
POLYGON ((10 10, 60 100, 110 10, 10 10))
POINT (10 20)
false
false
false
mA/L
A has 2 shells touching at one vertex and one non-vertex.
B passes between the shells, but is wholely contained
MULTIPOLYGON (((100 30, 30 110, 150 110, 100 30)),
((90 110, 30 170, 140 170, 90 110)))
LINESTRING (90 80, 90 150)
true
true
mA/L
A has 2 shells touching at one vertex and one non-vertex
B passes between the shells, but is NOT contained (since it is slightly offset)
MULTIPOLYGON (((100 30, 30 110, 150 110, 100 30)),
((90 110, 30 170, 140 170, 90 110)))
LINESTRING (90.1 80, 90 150)
false
true
mA/L - 2 disjoint shells with line crossing between them
MULTIPOLYGON (((50 20, 10 70, 80 70, 50 20)),
((10 90, 80 90, 50 140, 10 90)))
LINESTRING (50 110, 50 60)
false
false
true
A/L - proper intersection crossing bdy
POLYGON ((10 10, 10 100, 120 110, 120 30, 10 10))
LINESTRING (60 60, 70 140)
false
true
A/L - non-proper intersection crossing bdy
POLYGON ((10 10, 60 100, 110 10, 10 10))
LINESTRING (60 60, 60 140)
false
false
true
A/L - wholely contained
POLYGON ((10 10, 60 100, 110 10, 10 10))
LINESTRING (50 30, 70 60)
true
true
true
A/L - contained but touching bdy at interior point
POLYGON ((10 10, 60 100, 110 10, 10 10))
LINESTRING (60 10, 70 60)
true
true
true
A/L - line in bdy - covered but not contained
POLYGON ((10 10, 60 100, 110 10, 10 10))
LINESTRING (30 10, 90 10)
false
true
true
A/A - two equal polygons
POLYGON((20 20, 20 100, 120 100, 140 20, 20 20))
POLYGON((20 20, 20 100, 120 100, 140 20, 20 20))
true
true
true
A/L - line with repeated points
POLYGON((20 20, 20 100, 120 100, 140 20, 20 20))
LINESTRING (10 60, 50 60, 60 30, 60 30, 90 80, 90 80, 160 70)
false
false
true
A/L - polygon and line with repeated points
POLYGON((20 20, 20 100, 120 100, 120 100, 120 100, 140 20, 140 20, 140 20, 20 20))
LINESTRING (10 60, 50 60, 60 30, 60 30, 90 80, 90 80, 160 70)
false
false
true