ST_MeshGeomFromEWKB

更新时间:
复制 MD 格式

Constructs a meshgeom object from its Extended Well-Known Binary (EWKB) representation.

Syntax

meshgeom ST_MeshGeomFromEWKB(bytea ewkb);

Parameters

ParameterDescription
ewkbThe EWKB representation of the meshgeom object.

Examples

The following example converts a meshgeom literal to EWKB using ST_AsEWKB, reconstructs the meshgeom object using ST_MeshGeomFromEWKB, and then converts the result back to EWKT for verification using ST_AsEWKT.

SELECT ST_AsEWKT(
  ST_MeshGeomFromEWKB(
    ST_AsEWKB(
      'MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))'::meshgeom
    )
  )
);

Output:

MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))