Converts a geometry object to a meshgeom object.
Syntax
meshgeom ST_MeshGeomFromGeom(geometry geom);Parameters
| Parameter | Type | Description |
|---|---|---|
geom | geometry | The source geometry object to convert. |
Description
ST_MeshGeomFromGeom takes a geometry input and returns a meshgeom object.
This function is equivalent to the explicit cast geometry::meshgeom.
Example
SELECT ST_AsEWKT(ST_MeshGeomFromGeom('POLYGON((0 0 1, 10 0 2, 10 10 3, 0 0 1))'::geometry));Output:
MESHGEOM(PATCH(POLYGON((0 0 1,10 0 2,10 10 3,0 0 1))))See also
ST_AsEWKT— returns the Extended Well-Known Text (EWKT) representation of a geometry object
该文章对您有帮助吗?