MySQL provides a set of useful nonstandard functions for creating geometry values. The functions described in this section are MySQL extensions to the OpenGIS specification.
      These functions produce geometry objects from either WKB values or
      geometry objects as arguments. If any argument is not a proper WKB
      or geometry representation of the proper object type, the return
      value is NULL.
    
      For example, you can insert the geometry return value from
      Point() directly into a
      POINT column:
    
INSERT INTO t1 (pt_col) VALUES(Point(1,2));- Constructs a - GeomCollectionvalue from the geometry arguments.- GeomCollection()returns all the proper geometries contained in the arguments even if a nonsupported geometry is present.- GeomCollection()with no arguments is permitted as a way to create an empty geometry. Also, functions such as- ST_GeomFromText()that accept WKT geometry collection arguments understand both OpenGIS- 'GEOMETRYCOLLECTION EMPTY'standard syntax and MySQL- 'GEOMETRYCOLLECTION()'nonstandard syntax.- GeomCollection()and- GeometryCollection()are synonymous, with- GeomCollection()the preferred function.
- GeometryCollection(- g[,- g] ...)- Constructs a - GeomCollectionvalue from the geometry arguments.- GeometryCollection()returns all the proper geometries contained in the arguments even if a nonsupported geometry is present.- GeometryCollection()with no arguments is permitted as a way to create an empty geometry. Also, functions such as- ST_GeomFromText()that accept WKT geometry collection arguments understand both OpenGIS- 'GEOMETRYCOLLECTION EMPTY'standard syntax and MySQL- 'GEOMETRYCOLLECTION()'nonstandard syntax.- GeomCollection()and- GeometryCollection()are synonymous, with- GeomCollection()the preferred function.
- Constructs a - LineStringvalue from a number of- Pointor WKB- Pointarguments. If the number of arguments is less than two, the return value is- NULL.
- MultiLineString(- ls[,- ls] ...)- Constructs a - MultiLineStringvalue using- LineStringor WKB- LineStringarguments.
- Constructs a - MultiPointvalue using- Pointor WKB- Pointarguments.
- MultiPolygon(- poly[,- poly] ...)- Constructs a - MultiPolygonvalue from a set of- Polygonor WKB- Polygonarguments.
- Constructs a - Pointusing its coordinates.
- Constructs a - Polygonvalue from a number of- LineStringor WKB- LineStringarguments. If any argument does not represent a- LinearRing(that is, not a closed and simple- LineString), the return value is- NULL.