Determines if this geometry and a specified geometry touch.
public bool Touches(IGeometry other)
true if this geometry is “spatially touches” another geometry.
|ArgumentException||One of the geometries is invalid in such way that operation can not be finished.|
This method tests whether geometries touch each other in terms of DE-9IM intersection matrix. Two geometries touch each other if they have at least one boundary point in common, but no interior points. That is: two
LineStrings touch each other if they share an endpoint, but don’t share a segment, two polygons touch each other if they share part of exterior or interior ring, but their interiors don’t overlap. This method is equivalent to:
this.Relate(other, "FT*******") || this.Relate(other, "F**T*****") || this.Relate(other, "F***T****");
See OpenGIS Simple Features Specification for more details about DE-9IM and “spatially touches” relation.