Geometry values are handled using a function call GeomFromText('FGF Text string'), as is typical in an SQL query.
The Autodesk extension to WKT, referred to as FGF Text, is a superset of WKT (that is, you can enter WKT as valid FGF Text strings). Dimensionality is optional. It can be XY, XYM, XYZ, or XYZM. If it is not specified, it is assumed to be XY. For more information about FGF Text, see FGF Text.
The following is the grammar definition for FGF Text:
<FGF Text> ::= POINT <Dimensionality> <PointEntity>
| LINESTRING <Dimensionality> <LineString>
| POLYGON <Dimensionality> <Polygon>
| CURVESTRING <Dimensionality> <CurveString>
| CURVEPOLYGON <Dimensionality> <CurvePolygon>
| MULTIPOINT <Dimensionality> <MultiPoint>
| MULTILINESTRING <Dimensionality> <MultiLineString>
| MULTIPOLYGON <Dimensionality> <MultiPolygon>
| MULTICURVESTRING <Dimensionality> <MultiCurveString>
| MULTICURVEPOLYGON <Dimensionality> <MultiCurvePolygon>
| GEOMETRYCOLLECTION <GeometryCollection>
<PointEntity> ::= '(' <Point> ')'
<LineString> ::= '(' <PointCollection> ')'
<Polygon> ::= '(' <LineStringCollection> ')'
<MultiPoint> ::= '(' <PointCollection> ')'
<MultiLineString> ::= '(' <LineStringCollection> ')'
<MultiPolygon> ::= '(' <PolygonCollection> ')'
<GeometryCollection : '(' <FGF Collection Text> ')'
<CurveString> ::= '(' <Point> '(' <CurveSegmentCollection> ')' ')'
<CurvePolygon> ::= '(' <CurveStringCollection> ')'
<MultiCurveString> ::= '(' <CurveStringCollection> ')'
<MultiCurvePolygon> ::= '(' <CurvePolygonCollection> ')'
<Dimensionality> ::= // default to XY
| <PointCollection ',' <Point>
<LineStringCollection> ::= <LineString>
| <LineStringCollection> ',' <LineString>
<PolygonCollection> ::= <Polygon>
| <PolygonCollection> ',' <Polygon>
<FGF Collection Text> ::= <FGF Text>
| <FGF Collection Text> ',' <FGF Text>
<CurveSegment> ::= CIRCULARARCSEGMENT '(' <Point> ',' <Point> ')'
| LINESTRINGSEGMENT '(' <PointCollection> ')'
<CurveSegmentCollection> ::= <CurveSegment>
| <CurveSegmentCollection> ',' <CurveSegment>
<CurveStringCollection> ::= <CurveString>
| <CurveStringCollection> ',' <CurveString>
<CurvePolygonCollection> ::= <CurvePolygon>
| <CurvePolygonCollection> ',' <CurvePolygon>
The only other token type is DOUBLE, representing a double precision floating point values. Integer (non-decimal point) input is converted to DOUBLE in the lexical analyzer.
Examples of the Autodesk extensions include:
POINT XY (10 11) // equivalent to POINT (10 11)
GEOMETRYCOLLECTION (POINT xyz (10 11 12),POINT XYM (30 20 1.8), LINESTRING XYZM(1 2 3 4, 3 5 15, 3 20 20))
CURVESTRING (0 0 (LINESTRINGSEGMENT (10 10, 20 20, 30 40))))
CURVESTRING (0 0 (CIRCULARARCSEGMENT (11 11, 12 12), LINESTRINGSEGMENT (10 10, 20 20, 30 40)))
CURVESTRING (0 0 (ARC (11 11, 12 12), LINESTRINGSEGMENT (10 10, 20 20, 30 40)))
CURVESTRING XYZ (0 0 0 (LINESTRINGSEGMENT (10 10 1, 20 20 1, 30 40 1)))
MULTICURVESTRING ((0 0 (LINESTRINGSEGMENT (10 10, 20 20, 30 40))),(0 0 (ARC (11 11, 12 12), LINESTRINGSEGMENT (10 10, 20 20, 30 40))))
CURVEPOLYGON ((0 0 (LINESTRINGSEGMENT (10 10, 10 20, 20 20), ARC (20 15, 10 10))), (0 0 (ARC (11 11, 12 12), LINESTRINGSEGMENT (10 10, 20 20, 40 40, 90 90))))
MULTICURVEPOLYGON (((0 0 (LINESTRINGSEGMENT (10 10, 10 20, 20 20), ARC (20 15, 10 10))), (0 0 (ARC (11 11, 12 12), LINESTRINGSEGMENT (10 10, 20 20, 40 40, 90 90)))),((0 0 (LINESTRINGSEGMENT (10 10, 10 20, 20 20), ARC (20 15, 10 10))), (0 0 (ARC (11 11, 12 12), LINESTRINGSEGMENT (10 10, 20 20, 40 40, 90 90)))))