IGeometry.SpatiallyContains

IGeometry.SpatiallyContains method

Determines whether this geometry spatially contains a specified geometry.

public bool SpatiallyContains(IGeometry other)
ParameterTypeDescription
otherIGeometryA geometry.

Return Value

true if this geometry is “spatially contains” 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 contains another in terms of DE-9IM intersection matrix. This method is equivalent to:

other.Within(this);

See Also