This topic describes the ST_MeshGeomFromGeom function. This function constructs a meshgeom object from a geometry object.

Syntax

meshgeom ST_MeshGeomFromGeom(geometry geom);

Parameters

Parameter Description
geom The geometry object.

Description

This function constructs a meshgeom object from a geometry object. This function serves the same as the explicit type conversion geometry::meshgeom.

Examples

select ST_AsEWKT(ST_MeshGeomFromGeom('POLYGON((0 0 1, 10 0 2, 10 10 3, 0 0 1))'::geometry));

---------------------------------------------
MESHGEOM(PATCH(POLYGON((0 0 1,10 0 2,10 10 3,0 0 1))))