Skip to content
Updated Intersection Matrix Calculation (markdown) authored by eswiss's avatar eswiss
...@@ -108,14 +108,26 @@ The IM for the two disjoint geometries of dimension .one is (1) FF1FF0102, if bo ...@@ -108,14 +108,26 @@ The IM for the two disjoint geometries of dimension .one is (1) FF1FF0102, if bo
The IM for two LineStrings (not LinearRings) is The IM for two LineStrings (not LinearRings) is
I ∩ I = 0, if two line segments intersect at the interior of both LineStrings, else .false I ∩ I = 0, if two line segments intersect at the interior of both LineStrings, else .false
I ∩ B = 0, if the interior of one line segment intersects an endpoint of another line segment, else .false I ∩ B = 0, if the interior of one line segment intersects an endpoint of another line segment, else .false
I ∩ E = 1, if part of one line segment of the first LineString lies outside of the second line String, else .false (Note this value cannot be 0.) I ∩ E = 1, if part of one line segment of the first LineString lies outside of the second LineString, else .false (Note this value cannot be 0.)
B ∩ I = 0, if the interior of one line segment intersects an endpoint of another line segment, else .false B ∩ I = 0, if the interior of one line segment intersects an endpoint of another line segment, else .false
B ∩ B = 0, if the endpoints of the LineStrings meet at one more points, else .false B ∩ B = 0, if the endpoints of the LineStrings meet at one more points, else .false
B ∩ E = 0, if the two endpoints of the first LineString do not both lie on the second LineString, else .false B ∩ E = 0, if the two endpoints of the first LineString do not both lie on the second LineString, else .false
E ∩ I = 0, if part of one line segment of the second LineString lies outside of the first line String, else .false (Note this value cannot be 0.) E ∩ I = 1, if part of one line segment of the second LineString lies outside of the first LineString, else .false (Note this value cannot be 0.)
E ∩ B = 0, if the two endpoints of the second LineString do not both lie on the first LineString, else .false E ∩ B = 0, if the two endpoints of the second LineString do not both lie on the first LineString, else .false
E ∩ E = 2 E ∩ E = 2
The IM for a LineString (not LinearRing) and a LinearRing, in that order, is
I ∩ I = 0, if line segments from each geometry intersect at the interior of both, else .false
I ∩ B = 0, .false
I ∩ E = 1, if part of one line segment of the LineString lies outside of the LinearRing, else .false (Note this value cannot be 0.)
B ∩ I = 0, if at least one of the endpoints of the LineString intersects the LinearRing, else .false
B ∩ B = 0, .false
B ∩ E = 0, if the two endpoints of the LineString do not both lie on the LinearRing, else .false
E ∩ I = 1 (Note part of the LinearRing must lie outside of the LineString)
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 dimension of the intersection of two geometries, one of which is dimension .one and the other dimension .two, is either .zero, .one, or .false** **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. 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.
... ...
......