Was this helpful?
GeometryZMFromWKB
GEOMETRYZFROMWKB(b binary [, srid integer])
Alias: GEOMZMFROMWKB, ST_GEOMETRYZMFROMWKB, ST_GEOMZMFROMWKB
Returns a geometry object that corresponds to the Well Known Binary (WKB) representation of the object given in b. The srid specifies the object's SRID. If left unspecified, the SRID returns -1. This function only supports geometries that contain both Z and M coordinates.
Result type: geometry
Examples:
How do I insert results from ASBINARY into GEOMZMFROMWKB manually (for example, copy ASBINARY results and paste into GEOMZMFROMWKB)?
First specify the point using GEOMZMFROMTEXT, then get the binary representation using ASBINARY, then specify the point using GEOMZMFROMWKB, and then display the point as text using ASTEXT.
SELECT ASTEXT(GEOMZMFROMWKB(ASBINARY(GEOMZMFROMTEXT('POINT ZM(1 2 2 1)'))));
--------------------------------
col1
--------------------------------
POINT ZM (1 2 2 1)
--------------------------------
SRID of a point when it is not specified.
SELECT SRID(GEOMZMFROMWKB(ASBINARY(GEOMZMFROMTEXT('POINT ZM(1 2 2 1)'))));
-------------
col1
-------------
-1
-------------
SRID of a point when it is specified.
SELECT SRID(GEOMZMFROMWKB(ASBINARY(GEOMZMFROMTEXT('POINT ZM(1 2 2 1)')), 4955));
-------------
col1
-------------
4955
-------------
Last modified date: 08/28/2024