Geometry.SpatiallyEquals

Geometry.SpatiallyEquals method

Determines if this geometry spatially equal to a specified geometry.

public bool SpatiallyEquals(IGeometry other)
ParameterTypeDescription
otherIGeometryA geometry.

Return Value

true if this geometry “spatially equals” to specified 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 equality in terms of DE-9IM intersection matrix. It does not depend on order of components (e.g. order of interior rings in polygon), Z and M values. Basically, it tests that two geometries occupy the same “space” when projected on two dimensional space. This method is equivalent to:

this.Relate(other, "T*F**FFF*");

See OpenGIS Simple Features Specification for more details about DE-9IM.

See Also