AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual MgGeometry* MgGeometry::Boundary (  )  [virtual]

Remarks:

Class Boundary
MgPoint, MgMultiPoint Empty set.
MgLineString, MgCurveString If closed: empty set. If not closed: 2 end points.
MgMultiLineString, MgMultiCurveString Points that are in the boundaries of the element curves after application of the 'Mod 2' union rule (see below).
MgPolygon, MgCurvePolygon Its set of Rings.
MgMultiPolygon, MgMultiCurvePolygon The set of Rings of its polygons.
MgMultiGeometry Points that are in the boundaries of the heterogenous element geometries after application of the 'Mod 2' union rule (see below).

.NET Syntax
virtual MgGeometry Boundary();
Java Syntax
virtual MgGeometry Boundary();
PHP Syntax
virtual MgGeometry Boundary();

Returns:
An MgGeometry that represents this geometric entity's boundary.

'Mod 2' Union Rule

[OGC99-049 ] references [OGC96-015R1 ] for the definition of this rule. In section 3.12.3.2 [OGC96-015R1] states the following:
"For complex geometries, we take the 'mod 2' union of the components. That means that a point is in the boundary of a complex object (represented as disjoint representational geometries) if it is in an odd number of the boundaries of its component simple geometries."

The following illustrations are inspired by the discussion in section 8.2.5 of [JTS1.4 ].

Case Boundary
1 a, b, c, d
2 a, b, c, d
3 a, d
4 a, b, e, d
5 b, c, polygon((d, e, f, g))
6 b, (polygon((d, e, f, g)) - c)

mod2Rule.png