Skip to content
Updated Intersection Matrix Calculation (markdown) authored by eswiss's avatar eswiss
......@@ -152,6 +152,17 @@ E ∩ B = .false
E ∩ E = 2
If the order of the two geometries is reversed, the intersection matrix would be the transpose of the above.
The IM for two MultilineStrings (not LinearRings?) is
I ∩ I = 0, if line segments from each geometry intersect at the interior of both, else .false
I ∩ B = 0, if the interior of one line segment of the first MultilineString intersects an endpoint of the second MultilineString, else .false
I ∩ E = 1, if part of one line segment of the first MultilineString lies outside of the second MultilineString, else .false (Note this value cannot be 0.)
B ∩ I = 0, if at least one of the endpoints of the first MultilineString intersects the interior of the second MultilineString, else .false
B ∩ B = 0, if at least one of the endpoints of the first MultilineString intersects one of the endpoints of the second MultilineString, else .false
B ∩ E = 0, if at least one of the endpoints of the first MultilineString does not lie on the second MultilineString, else .false
E ∩ I = 1, if part of the second MultilineString lies outside of the first MultilineString, else .false (Note this value cannot be 0.)
E ∩ B = 0, if at least of the endpoints of the second MultilineString do not lie on the first MultilineString, else .false
E ∩ E = 2
**The dimension of the intersection of two geometries, one of which is dimension .one and the other dimension .two, is either .zero, .one, or .false**
Use the SweepLineIntersector algorithm. If two segments, one from each geometry, overlap on any sub-segment, return .one. If a segment from the one-dimensional geometry crosses into the interior of the polygon, return .one. If the one-dimensional geometry is completely contained in the polygon, but not completely contained in one of its holes, return .one. If the one-dimensional geometry is completely contained in a hole of the polygon, return .zero. If the two geometries intersect at one more points, return .zero, else return .false.
......
......