SpatiallyContains

Geometry.SpatiallyContains method

Determines whether this geometry spatially contains a specified geometry.

public bool SpatiallyContains(IGeometry other)
Parameter Type Description
other IGeometry A geometry.

Return Value

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

Exceptions

exception condition
ArgumentNullException Argument is null.
ArgumentException One of the geometries is invalid in such way that operation can not be finished.
ArgumentException SpatialReferenceSystem 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