MySQL uses the WKB function to create geometry (geometric) values
MySQL provides a number of functions that include a blob containing a wkt expression, or an optional space Reference System ID (SRID) as an input parameter. They return the corresponding geometric objects.
GEOMFROMWKB () accepts any geometric type of WKB as its 1th parameter. Type-dependent constructors are also provided in the implementation to construct the geometric values of each geometric type.
GEOMCOLLFROMWKB (Wkb[,srid]), GEOMETRYCOLLECTIONFROMWKB (Wkb[,srid))
Constructs geometrycollection values using their WKB representations and Srid.
GEOMFROMWKB (Wkb[,srid]), GEOMETRYFROMWKB (Wkb[,srid))
Constructs any type of geometric value using its WKB representations and Srid.
LINEFROMWKB (Wkb[,srid]), LINESTRINGFROMWKB (Wkb[,srid))
Constructs linestring values using their WKB representations and Srid.
MLINEFROMWKB (Wkb[,srid]), MULTILINESTRINGFROMWKB (Wkb[,srid))
Constructs multilinestring values using their WKB representations and Srid.
MPOINTFROMWKB (Wkb[,srid]), MULTIPOINTFROMWKB (Wkb[,srid))
Constructs multipoint values using their WKB representations and Srid.
MPOLYFROMWKB (Wkb[,srid]), MULTIPOLYGONFROMWKB (Wkb[,srid))
Constructs Multipolygon values using their WKB representations and Srid.
POINTFROMWKB (Wkb[,srid])
Constructs point values using their WKB representations and Srid.
POLYFROMWKB (Wkb[,srid]), POLYGONFROMWKB (Wkb[,srid))
Constructs polygon values using their WKB representations and Srid.
The OpenGIS specification also describes the optional functions that are used to construct polygon or Multipolygon values based on the WKB expression of the loop and enclosing linestring values collection. These values can intersect. MySQL does not implement the following functions:
BDMPOLYFROMWKB (Wkb,srid)
Constructs a Multipolygon value from a multilinestring value in a WKB format that contains any set of closed linestring values.
BDPOLYFROMWKB (Wkb,srid)
Constructs a polygon value from a multilinestring value in a WKB format that contains any set of closed linestring values.
Note : Please pay attention to the triple programming Tutorials section for more wonderful articles .