Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Synonym for ST_LineFromWKB. Constructs a LineString value from its WKB representation and an optional SRID.
A synonym for ST_LineFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomCollFromWKB. Constructs a GeometryCollection value from its WKB representation and an optional SRID.
A synonym for ST_GeomCollFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_AsBinary. Converts a geometry value from its internal format to its Well-Known Binary (WKB) representation.
A synonym for ST_AsBinary().
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PolyFromWKB. Constructs a Polygon value from its WKB representation and an optional SRID.
A synonym for ST_PolyFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PointFromWKB. Constructs a Point value from its WKB representation and an optional SRID.
A synonym for ST_PointFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_LineFromWKB. Constructs a LineString value from its WKB representation and an optional SRID.
A synonym for ST_LineFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiLineStringFromWKB. Constructs a MultiLineString value from its WKB representation and an optional SRID.
A synonym for MLineFromWKB().
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomCollFromWKB. Constructs a GeometryCollection value from its WKB representation and an optional SRID.
A synonym for ST_GeomCollFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiPointFromWKB. Constructs a MultiPoint value from its WKB representation and an optional SRID.
A synonym for MPointFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomCollFromWKB. Constructs a GeometryCollection value from its WKB representation and an optional SRID.
A synonym for ST_GeomCollFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiPolygonFromWKB. Constructs a MultiPolygon value from its WKB representation and an optional SRID.
Synonym for MPolyFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomFromWKB. Constructs a geometry value of any type from its WKB representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_AsBinary. Converts a geometry value from its internal format to its Well-Known Binary (WKB) representation.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomFromWKB. Constructs a geometry value of any type from its WKB representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PolyFromWKB. Constructs a Polygon value from its WKB representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_GeomFromWKB. Constructs a geometry value of any type from its WKB representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_LineFromWKB. Constructs a LineString value from its WKB representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_AsBinary. Converts a geometry value from its internal format to its Well-Known Binary (WKB) representation.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Constructs a MultiLineString value using its WKB representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_PolyFromWKB. Constructs a Polygon value from its WKB representation and an optional SRID.
A synonym for .
This page is licensed: CC BY-SA / Gnu FDL
ST_AsBinary(), AsBinary(), ST_AsWKB() and AsWKB() are synonyms,This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_AsBinary(g)
AsBinary(g)
ST_AsWKB(g)
AsWKB(g)ST_GeomCollFromWKB(), ST_GeometryCollectionFromWKB(), GeomCollFromWKB() and GeometryCollectionFromWKB() are synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_GeomCollFromWKB(wkb[,srid])
ST_GeometryCollectionFromWKB(wkb[,srid])
GeomCollFromWKB(wkb[,srid])
GeometryCollectionFromWKB(wkb[,srid])MPointFromWKB() and MultiPointFromWKB() are synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
MPointFromWKB(wkb[,srid])
MultiPointFromWKB(wkb[,srid])ST_LineFromWKB(), LineFromWKB(), ST_LineStringFromWKB(), and LineStringFromWKB() are synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_LineFromWKB(wkb[,srid])
LineFromWKB(wkb[,srid])
ST_LineStringFromWKB(wkb[,srid])
LineStringFromWKB(wkb[,srid])ST_GeomFromWKB(), ST_GeometryFromWKB(), GeomFromWKB() and GeometryFromWKB() are synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_GeomFromWKB(wkb[,srid])
ST_GeometryFromWKB(wkb[,srid])
GeomFromWKB(wkb[,srid])
GeometryFromWKB(wkb[,srid])Synonym for ST_MultiPolygonFromWKB. Constructs a MultiPolygon value from its WKB representation and an optional SRID.
MPolyFromWKB(wkb[,srid])
MultiPolygonFromWKB(wkb[,srid])Constructs a MULTIPOLYGON value using its WKB representation and SRID.
MPolyFromWKB() and MultiPolygonFromWKB() are synonyms.
This page is licensed: GPLv2, originally from
Understand the standard binary format for geometry. This overview explains how WKB represents spatial data types for storage and exchange.
WKB stands for Well-Known Binary, a format for representing geographical and geometrical data.
WKB uses 1-byte unsigned integers, 4-byte unsigned integers, and 8-byte double-precision numbers.
The first byte indicates the byte order. 00 for big endian, or 01 for little endian.
The next 4 bytes indicate the geometry type. Values from 1 to 7 indicate whether the type is Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, or GeometryCollection respectively.
The 8-byte floats represent the co-ordinates.
Take the following example, a sequence of 21 bytes each represented by two hex digits:
It's big endian
000000000140000000000000004010000000000000
It's a POINT
000000000140000000000000004010000000000000
This page is licensed: CC BY-SA / Gnu FDL
Constructs a MultiPolygon value using its WKB representation and an optional SRID.
A synonym for ST_GeomFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiPointFromWKB. Constructs a MultiPoint value from its WKB representation and an optional SRID.
A synonym for ST_GeomFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
Synonym for ST_MultiPolygonFromWKB. Constructs a MultiPolygon value from its WKB representation and an optional SRID.
A synonym for ST_GeomFromWKB.
This page is licensed: CC BY-SA / Gnu FDL
SET @poly = ST_GeomFromText('POLYGON((0 0,0 1,1 1,1 0,0 0))');
SELECT ST_AsBinary(@poly);
SELECT ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly)));
+--------------------------------------------+
| ST_AsText(ST_GeomFromWKB(ST_AsWKB(@poly))) |
+--------------------------------------------+
| POLYGON((0 0,0 1,1 1,1 0,0 0)) |
+--------------------------------------------+SET @g = ST_AsBinary(ST_GeomFromText('GEOMETRYCOLLECTION(
POLYGON((5 5,10 5,10 10,5 5)),POINT(10 10))'));
SELECT ST_AsText(ST_GeomCollFromWKB(@g));
+----------------------------------------------------------------+
| ST_AsText(ST_GeomCollFromWKB(@g)) |
+----------------------------------------------------------------+
| GEOMETRYCOLLECTION(POLYGON((5 5,10 5,10 10,5 5)),POINT(10 10)) |
+----------------------------------------------------------------+SET @g = ST_AsBinary(MPointFromText('MultiPoint( 1 1, 2 2, 5 3, 7 2, 9 3, 8 4, 6 6, 6 9, 4 9, 1 5 )'));
SELECT ST_AsText(MPointFromWKB(@g));
+-----------------------------------------------------+
| ST_AsText(MPointFromWKB(@g)) |
+-----------------------------------------------------+
| MULTIPOINT(1 1,2 2,5 3,7 2,9 3,8 4,6 6,6 9,4 9,1 5) |
+-----------------------------------------------------+SET @g = ST_AsBinary(ST_LineFromText('LineString(0 4,4 6)'));
SELECT ST_AsText(ST_LineFromWKB(@g)) AS l;
+---------------------+
| l |
+---------------------+
| LINESTRING(0 4,4 6) |
+---------------------+SET @g = ST_AsBinary(ST_LineFromText('LINESTRING(0 4, 4 6)'));
SELECT ST_AsText(ST_GeomFromWKB(@g));
+-------------------------------+
| ST_AsText(ST_GeomFromWKB(@g)) |
+-------------------------------+
| LINESTRING(0 4,4 6) |
+-------------------------------+The X co-ordinate is 2.0
000000000140000000000000004010000000000000
The Y-co-ordinate is 4.0
000000000140000000000000004010000000000000
000000000140000000000000004010000000000000ST_PointFromWKB() and PointFromWKB() are synonyms.This page is licensed: GPLv2, originally from fill_help_tables.sql
ST_PointFromWKB(wkb[,srid])
PointFromWKB(wkb[,srid])SET @g = ST_AsBinary(MPointFromText('MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))'));
SELECT ST_AsText(MPolyFromWKB(@g))\G
*************************** 1. row ***************************
ST_AsText(MPolyFromWKB(@g)): MULTIPOLYGON(((28 26,28 0,84 0,84 42,28 26),(52 18,66 23,73 9,48 6,52 18)),((59 18,67 18,67 13,59 13,59 18)))Constructs a Polygon value using its WKB representation and an optional SRID.
ST_PolyFromWKB(wkb[,srid])
ST_PolygonFromWKB(wkb[,srid])
PolyFromWKB(wkb[,srid])
PolygonFromWKB(wkb[,srid])Constructs a POLYGON value using its WKB representation and SRID.
ST_PolyFromWKB(), ST_PolygonFromWKB(), PolyFromWKB() and PolygonFromWKB() are synonyms.
This page is licensed: GPLv2, originally from
Synonym for ST_MultiLineStringFromWKB. Constructs a MultiLineString value from its WKB representation and an optional SRID.
MLineFromWKB(wkb[,srid])
MultiLineStringFromWKB(wkb[,srid])Constructs a MULTILINESTRING value using its WKB representation and SRID.
MLineFromWKB() and MultiLineStringFromWKB() are synonyms.
This page is licensed: GPLv2, originally from
SET @g = ST_AsBinary(ST_PointFromText('POINT(0 4)'));
SELECT ST_AsText(ST_PointFromWKB(@g)) AS p;
+------------+
| p |
+------------+
| POINT(0 4) |
+------------+SET @g = ST_AsBinary(ST_PolyFromText('POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1))'));
SELECT ST_AsText(ST_PolyFromWKB(@g)) AS p;
+----------------------------------------+
| p |
+----------------------------------------+
| POLYGON((1 1,1 5,4 9,6 9,9 3,7 2,1 1)) |
+----------------------------------------+SET @g = ST_AsBinary(MLineFromText('MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48))'));
SELECT ST_AsText(MLineFromWKB(@g));
+--------------------------------------------------------+
| ST_AsText(MLineFromWKB(@g)) |
+--------------------------------------------------------+
| MULTILINESTRING((10 48,10 21,10 0),(16 0,16 23,16 48)) |
+--------------------------------------------------------+Learn about Well-Known Binary (WKB) in MariaDB Server. This section details how to represent and store geometric data in a binary format, essential for efficient spatial data exchange and storage.