ST_AsWKB

更新时间:
复制 MD 格式

Returns the well-known binary (WKB) representation of an object of any type.

Syntax

bytea ST_AsWKB(meshgeom geom);
bytea ST_AsWKB(sfmesh sfmeshObject);
bytea ST_AsWKB(meshgeom geom, cstring endian);
bytea ST_AsWKB(sfmesh sfmeshObject, cstring endian);

Parameters

ParameterDescription
geomThe meshgeom object.
sfmeshObjectThe sfmesh object.
endianThe byte order of the WKB output. Valid values: NDR (little-endian), XDR (big-endian).

Example

select ST_AsWKB(ST_MeshFromText('{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(INDEXSURFACE Z (VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}'));

Output:

\x014d01020...