Constructs a MultiLineString geometry from a Well-Known Text (WKT) string and an optional spatial reference identifier (SRID).
Syntax
geometry ST_MLineFromText(text wKT, integer srid);
geometry ST_MLineFromText(text wKT);Parameters
| Parameter | Description |
|---|---|
wKT | The WKT string representing a MultiLineString geometry. |
srid | The SRID of the MultiLineString geometry. Defaults to 0 if not specified. |
Usage notes
If the WKT string does not represent a MultiLineString geometry, the function returns
null.If you know the input is a valid MultiLineString, use ST_GeomFromText instead. ST_GeomFromText constructs the geometry faster because no unnecessary checks are required.
Examples
SELECT ST_AsText(ST_MLineFromText('MULTILINESTRING((1 2,3 4), (5 6,7 8))'));
st_astext
--------------------------------------
MULTILINESTRING((1 2,3 4),(5 6,7 8))
(1 row)该文章对您有帮助吗?