This topic describes the ST_MLineFromText function. This function constructs a MultiLine object by using a Well-Known Text (WKT) string and a 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. |
Description
- If you can make sure that the information that you specify can be used to construct a MultiLine object, we recommend that you use the ST_GeomFromText function, which constructs a geometry object at a higher speed because no unnecessary checks are required.
- If you do not specify an SRID, the default SRID 0 is used.
- If the WKT string that you specify does not represent a MultiLine object, this function returns null.
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)