AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual MgGeometry* MgGeometry::SymetricDifference ( MgGeometry other  )  [virtual]

Returns a geometry that represents the point set symmetric difference of this geometry with another.

.NET Syntax
virtual MgGeometry SymetricDifference(MgGeometry other);
Java Syntax
virtual MgGeometry SymetricDifference(MgGeometry other);
PHP Syntax
virtual MgGeometry SymetricDifference(MgGeometry other);

Parameters:
other (MgGeometry) The MgGeometry to subtract from this one.
Returns:
An MgGeometry representing the symmetric difference.

Illustration

if (Geom1.Disjoint(Geom2) == True) then

A B SymDiff
Point | MultiPoint Point | MultiPoint MultiPoint
Point | MultiPoint LineString | MultiLineString Geometry Collection (MultiLineString Point+, LineString+)
Point | MultiPoint Polygon | MultiPolygon Geometry Collection (Point+, Polygon+)
LineString | MultiLineString LineString | MultiLineString MultiLineString
LineString |MultiLineString Polygon | MultiPolygon Geometry Collection (LineString+, Polygon+)
Polygon | MultiPolygon Polygon | MultiPolygon MultiPolygon

if (Geom1.Touches(Geom2) == True) then
symmetricDiffWhenTouches.png

if (Geom1.Crosses(Geom2) == True) then
symmetricDiffWhenCrosses.png

if (Geom1.Within(Geom2) == True) then
symmetricDiffWhenWithin.png

if (Geom1.Overlaps(Geom2) == True) then
symmetricDiffWhenOverlaps.png