15.10 - ST_GeomFromWKB - Teradata Database

Teradata Database SQL Geospatial Types

prodname
Teradata Database
vrm_release
15.10
category
Programming Reference
featnum
B035-1181-151K

User-defined function that returns a specified ST_Geometry value.

 

Argument …

Specifies …

awkb

a VARBYTE(64000) for the well-known binary (WKB) representation of the spatial type. The size of awkb cannot exceed 64000 bytes.

When a WKB representation is larger than 64000 bytes, use the ST_Geometry constructor method (BLOB version).

For details on WKB formats, see “Well-Known Binary Representation” on page 198.

asrid

an INTEGER value for a spatial reference system identifier.

If this argument is omitted, the spatial reference system identifier is set to 0.

Returns an ST_Geometry value.

For best performance, use the ST_Geometry constructor method instead of this UDF.

CREATE TABLE varbyte_tab1 (a int, b VARBYTE (6000));
INSERT INTO varbyte_tab1 VALUES (1002, NEW ST_Geometry(
 'Point(10 20 30)').ST_Asbinary());
 
INSERT INTO sample_shapes
SELECT a, SYSSPATIAL.ST_GeomFromWKB(b) FROM varbyte_tab1;
 
SELECT * FROM sample_shapes;