ST_AsHexEWKB

更新时间:
复制 MD 格式

Returns the hex-encoded Extended Well-Known Binary (HEXEWKB) representation of a meshgeom or sfmesh object.

Syntax

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

Parameters

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

Examples

The following example converts a mesh geometry to its HEXEWKB representation.

SELECT ST_AsHexEWKB(
  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:

014D0102011E0000800100000001...