Constructs a MultiLine object 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 that you want to specify. |
srid | The SRID of the MultiLine object. Defaults to 0 if not specified. |
Usage notes
If the WKT string does not represent a MultiLine object, the function returns
null.If the input is guaranteed to be a valid MultiLine object, use ST_GeomFromText instead. It constructs a geometry object at a higher speed 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)该文章对您有帮助吗?