This topic describes the ST_AsEWKB function. This function returns the extended well-known binary (EWKB) representation of an object of any type.

Syntax

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

Parameters

ParameterDescription
geomThe meshgeom object.
sfmeshObjectThe sfmesh object.
endianThe endian. Valid values:
  • NDR: little endian
  • XDR: big endian

Description

This function returns the EWKB representation of an object of any type.

Examples

select ST_AsEWKB(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}]}'));

------------------------------------------------------------------------------
\x014d01020...