This topic describes the ST_MeshGeomFromText function. This function constructs a meshgeom object from the well-known text (WKT) representation of the meshgeom object.
Syntax
meshgeom ST_MeshGeomFromText(text wkt);
meshgeom ST_MeshGeomFromText(text wkt, int4 srid);Parameters
| Parameter | Description |
|---|---|
| wkt | The meshgeom object in WKT representation. |
| srid | The spatial reference identifier. |
Description
This function constructs a meshgeom object from the WKT representation of the meshgeom object.
Examples
select ST_AsEWKT(ST_MeshGeomFromText('MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1), INDEX((0,1,2),(1,2,3)))))', 4326));
--------------
SRID=4326;MESHGEOM(PATCH(INDEXSURFACE(VERTEX(0 0 2,0 10 3,10 10 1,10 0 1),INDEX((0,1,2),(1,2,3)))))