This topic describes the ST_MeshFromGeom function. This function constructs an sfmesh object from a geometry object.
Syntax
sfmesh ST_MeshFromGeom(geometry geom);
Parameters
Parameter | Description |
---|---|
geom | The geometry object. |
Description
This function constructs an sfmesh object from a geometry object. This function serves the same as the explicit type conversion geometry::sfmesh
.
Examples
select ST_AsEWKT(ST_MeshFromGeom('POLYGON((0 0 1, 10 0 2, 10 10 3, 0 0 1))'::geometry));
st_asewkt
--------------------------------------------------------------
{"version" : 1, "root" : 0, "meshgeoms" : ["MESHGEOM(PATCH(POLYGON((0 0 1,10 0 2,10 10 3,0 0 1))))"], "primitives" : [{"meshgeom" : 0}], "nodes" : [{"primitive" : 0}]}