MapGuide API Reference
 All Classes Functions Variables Enumerations Enumerator Friends
MgMultiCurvePolygon Class Reference

An MgMultiCurvePolygon is a two-dimensional aggregate geometry whose elements are MgCurvePolygon geometries. More...

+ Inheritance diagram for MgMultiCurvePolygon:

List of all members.

Public Member Functions

virtual MgGeometricEntityCopy ()
virtual INT32 GetCount ()
virtual MgCurvePolygonGetCurvePolygon (INT32 index)
 
virtual INT32 GetDimension ()
 
virtual INT32 GetGeometryType ()
virtual bool IsClosed ()
virtual bool IsEmpty ()
 
virtual MgGeometricEntityTransform (MgTransform *transform)
 Returns a transformed copy of this geometric entity.

Detailed Description

An MgMultiCurvePolygon is a two-dimensional aggregate geometry whose elements are MgCurvePolygon geometries.

Remarks:
The polygons are not connected or ordered. An instance of this class is constructed by calling a non-static MgGeometryFactory::CreateMultiCurvePolygon() method and, once constructed, is immutable.
Example (PHP)
The following code shows the construction of an MgMultiCurvePolygon geometry. Review the MgCurvePolygon example code.

 // A helper class additional to those created in the
 // MgCurvePolygon example code is needed.
 $curvePolygonCollection = new MgCurvePolygonCollection();

 // After each MgCurvePolygon geometry is constructed,
 // it is added to an MgCurvePolygonCollection.
 $index = $curvePolygonCollection->Add($curvePolygon);
 echo "A curve polygon is added to a curve polygon  at index: $index\n";

 // construct the MgMultiCurvePolygon geometry
 $multiCurvePolygon = $geometryFactory-> CreateMultiCurvePolygon($curvePolygonCollection);

 // print out the Agf Text string for the geometry
 $multiCurvePolygonAgfText = $wktReaderWriter->Write($multiCurvePolygon);
 echo "AGF Text representation of MultiCurvePolygon: $multiCurvePolygonAgfText\n";
Example (C#)

The following code shows the construction of an MgMultiCurvePolygon object, which consists of two identical circles. The CreateAMultiCurvePolygonXY method calls the CreateACurvePolygonXY method. The code for the CreateACurvePolygonXY method is in the MgCurvePolygon example code.

 using OSGeo.MapGuide;
 private MgWktReaderWriter wktReaderWriter;
 private MgGeometryFactory geometryFactory;
 private MgMultiCurvePolygon mcpnEr0224422002Ir12233212Er0224422002Ir12233212;
 private double[][][][,] mcpnEr0224422002Ir12233212Er0224422002Ir12233212Data;
 private String geometryAgfText;

 public MgMultiCurvePolygon CreateAMultiCurvePolygonXY(double[][][][,] polygonData)
 {
     MgCurvePolygonCollection polygons = new MgCurvePolygonCollection();
     for (int i = 0; i < polygonData.GetLength(0); i++)
     {
         polygons.Add(CreateACurvePolygonXY(polygonData[i]));
     }
     return geometryFactory.CreateMultiCurvePolygon(polygons);
 }

 geometryFactory = new MgGeometryFactory();
 mcpnEr0224422002Ir12233212Er0224422002Ir12233212Data = new double[2][][][,];
 // the construction of cpEr0220422402Ir122332112Data is shown in the MgCurvePolygon example code.
 mcpnEr0224422002Ir12233212Er0224422002Ir12233212Data[0] = cpEr0220422402Ir122332112Data;
 mcpnEr0224422002Ir12233212Er0224422002Ir12233212Data[1] = cpEr0220422402Ir122332112Data;
 mcpnEr0224422002Ir12233212Er0224422002Ir12233212 = CreateAMultiCurvePolygonXY(mcpnEr0224422002Ir12233212Er0224422002Ir12233212Data);

 // print out the Agf Text string for the geometry
 wktReaderWriter = new MgWktReaderWriter();
 geometryAgfText = wktReaderWriter.Write(mcpnEr0224422002Ir12233212Er0224422002Ir12233212);
 // geometryAgfText now contains:
 // "MULTICURVEPOLYGON XY ((( 0 2 (CIRCULARARCSEGMENT( 2 0, 4 2), CIRCULARARCSEGMENT( 2 4, 0 2))), ( 1 2 ( CIRCULARARCSEGMENT( 2 3, 3 2), CIRCULARARCSEGMENT( 2 1, 1 2)))),
 //  (( 0 2 (CIRCULARARCSEGMENT( 2 0, 4 2), CIRCULARARCSEGMENT( 2 4, 0 2))), ( 1 2 ( CIRCULARARCSEGMENT( 2 3, 3 2), CIRCULARARCSEGMENT( 2 1, 1 2)))))"