ST_AsBinary
You are viewing an old version of this article. View
the current version here.
MariaDB starting with 5.3.3
ST_AsBinary was added as a synonym for AsBinary and ST_AsWKB was added as a synonym for AsWKB in MariaDB 5.3.3.
Syntax
ST_AsBinary(g) AsBinary(g) ST_AsWKB(g) AsWKB(g)
Description
Converts a value in internal geometry format to its WKB representation and returns the binary result.
ST_AsBinary()
, AsBinary()
, ST_AsWKB()
and AsWKB()
are synonyms,
Examples
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)) | +--------------------------------------------+
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.