ST_AsWKB()¶
ST_AsWKB returns the WKB binary representation of a geometry.
Syntax¶
ST_AsWKB(geom)
Aliases: ST_AsBinary().
Arguments¶
Argument |
Description |
|---|---|
|
GEOMETRY or GEOMETRY32. |
Return Value¶
Returns a BLOB value.
Usage Notes¶
Examples¶
DROP DATABASE IF EXISTS geo_io_example;
CREATE DATABASE geo_io_example;
USE geo_io_example;
SELECT ST_AsText(ST_GeomFromWKB(ST_AsWKB(ST_GeomFromText('POINT(1 2)')))) AS wkt;
DROP DATABASE geo_io_example;
See Also¶
ST_GeomFromWKB(), ST_AsText().