Geometry.Covers

Geometry.Covers method

Determines whether this geometry covers a specified geometry.

public bool Covers(IGeometry other)
ParameterTypeDescription
otherIGeometryA geometry.

Return Value

true if this geometry is “spatially covers” another geometry. false otherwise.

Exceptions

exceptioncondition
ArgumentNullExceptionArgument is null.
ArgumentExceptionOne of the geometries is invalid in such way that operation can not be finished.
ArgumentExceptionSpatialReferenceSystem of geometries are not equivalent. You can use SpatialReferenceSystemTransformation in order to convert geometries to the same spatial reference system.

Remarks

This method tests whether one geometry covers another in terms of DE-9IM intersection matrix. One geometry covers another one, if the geometry contains every point of another geometry. This method is similar to SpatiallyContains, but returns true more often, since it does not distinguish between interior and boundary points. So, if geometry A lies on boundary of geometry B, SpatiallyContains returns false, while this method returns true. This method is equivalent to:

this.Relate(other, "T*****FF*") || this.Relate(other, "*T****FF*") || this.Relate(other, "***T**FF*) || this.Relate(other, "***T*FF*");

See Also