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
| Parameter | Description |
|---|---|
geom | The meshgeom object. |
sfmeshObject | The sfmesh object. |
endian | The 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...该文章对您有帮助吗?