Creating Geometry Values Using WKB Functions
MySQL provides a number of functions that take as arguments a BLOB containing a Well-Known Binary representation and, optionally, a spatial reference system identifier (SRID). They return the corresponding geometry.
These functions also accept geometry objects for compatibility with the return value of the functions in , "Creating Geometry Values Using MySQL-Specific Functions". Thus, those functions may be used to provide the first argument to the functions in this section.
GeomCollFromWKB(,wkb[,srid])GeometryCollectionFromWKB(wkb[,srid])Constructs a
GEOMETRYCOLLECTIONvalue using its WKB representation and SRID.GeomFromWKB(,wkb[,srid])GeometryFromWKB(wkb[,srid])Constructs a geometry value of any type using its WKB representation and SRID.
LineFromWKB(,wkb[,srid])LineStringFromWKB(wkb[,srid])Constructs a
LINESTRINGvalue using its WKB representation and SRID.MLineFromWKB(,wkb[,srid])MultiLineStringFromWKB(wkb[,srid])Constructs a
MULTILINESTRINGvalue using its WKB representation and SRID.MPointFromWKB(,wkb[,srid])MultiPointFromWKB(wkb[,srid])Constructs a
MULTIPOINTvalue using its WKB representation and SRID.MPolyFromWKB(,wkb[,srid])MultiPolygonFromWKB(wkb[,srid])Constructs a
MULTIPOLYGONvalue using its WKB representation and SRID.PointFromWKB(wkb[,srid])Constructs a
POINTvalue using its WKB representation and SRID.PolyFromWKB(,wkb[,srid])PolygonFromWKB(wkb[,srid])Constructs a
POLYGONvalue using its WKB representation and SRID.
The OpenGIS specification also describes optional functions for constructing Polygon or MultiPolygon values based on the WKB representation of a collection of rings or closed LineString values. These values may intersect. MariaDB does not implement these functions:
BdMPolyFromWKB(wkb,srid)Constructs a
MultiPolygonvalue from aMultiLineStringvalue in WKB format containing an arbitrary collection of closedLineStringvalues.BdPolyFromWKB(wkb,srid)Constructs a
Polygonvalue from aMultiLineStringvalue in WKB format containing an arbitrary collection of closedLineStringvalues.