- AGF text format, which is an extension of the Open Geospatial Consortium (OGC) Well Known Text (WKT) format. This is used to represent geometry as a character string.
- Binary AGF format. The is used by the FDO technology supporting the Feature Service.
- Internal representation, using MgGeometry and classes derived from it.
To convert between AGF text and the internal representation, use an MgWktReaderWriter object. Call MgWktReaderWriter.Read() to convert AGF text to MgGeometry. Call MgWktReaderWriter.Write() to convert MgGeometry to AGF text.
To convert between binary AGF and the internal representation, use an MgAgfReaderWriter object. Call MgAgfReaderWriter.Read() to convert binary AGF to MgGeometry. Call MgAgfReaderWriter.Write() to convert MgGeometry to binary AGF.
MgWktReaderWriter wktReaderWriter = new MgWktReaderWriter();
MgGeometry geometry = wktReaderWriter.Read(wktGeometry);