AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

MgGeometryFactory Class Reference
[MgGeometryFactory]

Inherits MgDisposable.

List of all members.


Detailed Description

The MgGeometryFactory class is used to construct objects whose classes are derived from MgGeometry.

Remarks:
The starting point for the construction of the MgGeometry objects is user-supplied numbers of type double or integer. The lexical analyzer converts integers to doubles. The numbers are passed to one of the CreateCoordinate????() methods where ???? is one of XY, XYM, XYZ, or XYZM.
The MgGeometryFactory methods do no spatial analysis. Errors in the construction of the geometry objects are not detected until some operation in the datastore requiring spatial analysis is performed.
The general rules for constructing geometry objects are as follows: With respect to the construction of linear and curve polygons, the Autodesk Geometry Format (AGF) Binary specification does not stipulate the direction of traversal in a ring. However, some providers, for example, Oracle, require that the direction of traversal be counterclockwise in an exterior ring and clockwise in an interior ring.
The following statements are represented in the graphic at the bottom of this pane.
MgCoordinate objects are used directly to create MgPoint geometries and MgArcSegment geometry components.
MgCoordinateCollection objects are used to create MgLineString geometries, MgLinearRing geometry components and MgLinearSegment geometry components.
An MgPolygon geometry is constructed from an MgLinearRing geometry component, which defines the polygon's external boundary, and an optional MgLinearRingCollection of MgLinearRing geometry components, which define "holes' in the containing ring.
An MgCurveSegmentCollection of MgLinearSegment objects and MgArcSegment objects are used to create MgCurveString geometries and MgCurveRing geometry components.
An MgCurvePolygon geometry is constructed from an MgCurveRing geometry component, which defines the curve polygon's external boundary, and an optional MgCurveRingCollection of MgCurveRing geometries, which define "holes" in the containing ring.
Each single geometry (point, line string, polygon, curve string, and curve polygon) has a homogeneous multi-version. For example, an MgMultiPoint geometry is composed of MgPoint geometries. For each geometry type there is a helper collection class used to construct the multi-version object.
Finally an MgMultiGeometry object, which consists of a heterogeneous collection of geometries, is constructed by adding geometries to a helper collection class object and passing that collection object to a constructor.
GeometryFactory.png

Public Member Functions

virtual MgArcSegmentCreateArcSegment (MgCoordinate *start, MgCoordinate *end, MgCoordinate *control)
 Creates an arc segment from start, end, and control coordinates.
virtual MgCoordinateCreateCoordinateXY (double x, double y)
 Creates an MgCoordinate object with Dimension = XY, X = x, Y = y.
virtual MgCoordinateCreateCoordinateXYM (double x, double y, double m)
 Creates an MgCoordinate object with Dimension = XYM, X = x, Y = y, M = m.
virtual MgCoordinateCreateCoordinateXYZ (double x, double y, double z)
 Creates an MgCoordinate object with Dimension = XYZ, X = x, Y = y, Z = z.
virtual MgCoordinateCreateCoordinateXYZM (double x, double y, double z, double m)
 Creates an MgCoordinate object with Dimension = XYZM, X = x, Y = y, Z = z, M = m.
virtual MgCurvePolygonCreateCurvePolygon (MgCurveRing *outerRing, MgCurveRingCollection *innerRings)
 Creates a curve polygon from an outer ring and a collection of inner rings.
virtual MgCurveRingCreateCurveRing (MgCurveSegmentCollection *curveSegments)
 Creates a curve ring from a collection of curve segments.
virtual MgCurveStringCreateCurveString (MgCurveSegmentCollection *curveSegments)
 Creates a curve string from a collection of curve segments.
virtual MgLinearRingCreateLinearRing (MgCoordinateCollection *coordinates)
 Creates a linear ring from a collection of coordinates.
virtual MgLinearSegmentCreateLinearSegment (MgCoordinateCollection *coordinates)
 Creates a linear segment from a collection of coordinates.
virtual MgLineStringCreateLineString (MgCoordinateCollection *coordinates)
 Creates a line string from a collection of coordinates.
virtual
MgMultiCurvePolygon
CreateMultiCurvePolygon (MgCurvePolygonCollection *polygons)
 Creates a multi curve polygon aggregate geometry from a collection of curve polygons.
virtual
MgMultiCurveString
CreateMultiCurveString (MgCurveStringCollection *curveStrings)
 Creates a multi curve string aggregate geometry from a collection of curve strings.
virtual MgMultiGeometryCreateMultiGeometry (MgGeometryCollection *geometries)
 Creates an aggregate geometry from a collection of geometry objects.
virtual
MgMultiLineString
CreateMultiLineString (MgLineStringCollection *lineStrings)
 Creates a multi line string aggregate geometry from a collection of line strings.
virtual MgMultiPointCreateMultiPoint (MgPointCollection *points)
 Creates a multi point aggregate geometry from a collection of points.
virtual MgMultiPolygonCreateMultiPolygon (MgPolygonCollection *polygons)
 Creates a multi polygon aggregate geometry from a collection of polygons.
virtual MgPointCreatePoint (MgCoordinate *coordinate)
 Creates a point from a coordinate.
virtual MgPolygonCreatePolygon (MgLinearRing *outerRing, MgLinearRingCollection *innerRings)
 Creates a polygon from an outer ring and a collection of inner rings.
 MgGeometryFactory ()
 Creates an MgGeometryFactory object.