ST_GeomFromTWKB
Name
ST_GeomFromTWKB — Creates a geometry instance from a TWKB (" Tiny Well-Known Binary ") geometry representation.
Synopsis
geometry
ST_GeomFromTWKB
(
bytea
twkb
)
;
Description
The
ST_GeomFromTWKB
function, takes a a TWKB ("
Tiny Well-Known Binary
") geometry representation (WKB) and creates an instance of the appropriate
geometry type.
Examples
Code
SELECT ST_GeomFromTWKB(ST_AsTWKB('LINESTRING(126 34,127 35)'::geometry));
Output
LINESTRING(126 34, 127 35)
Code
SELECT ST_GeomFromTWKB(E'\\x620002f7f40dbce4040105');
Output
LINESTRING(-113.98 39.198,-113.981 39.195)