ST_LINEFROMTEXT
Alias for ST_LINESTRING(CHAR). Creates aLINESTRING from a specified CHAR. The CHAR must be a LINESTRING value in WKT format.
Syntax
SQL
Example
SQL
LINESTRING(1.000000 2.000000)
ST_LINEFROMWKB
Alias for ST_LINESTRING(BINARY). Creates aLINESTRING from the specified BINARY. The BINARY value must be a LINESTRING in WKB format.
Syntax
SQL
Example
SQL
LINESTRING(1 2,3 4)
ST_LINEFROMEWKT
Creates aLINESTRING from the specified CHAR.
The CHAR value must be a LINESTRING in EWKT format.
ST_LINEFROMEWKT is functionally the same as ST_LINESTRING(CHAR).
The input string must include an SRID=…; value. However, the database ignores this component as all geography types are SRID 4326.
Syntax
SQL
Example
SQL
LINESTRING(1.000000 2.000000)
ST_LINEFROMGEOJSON
Creates aLINESTRING represented by the specified GeoJSON. The specified GeoJSON can represent a GeoJSON POINT or LINESTRING type.
Valid GeoJSON formats follow standards, and you can generate them by using ST_ASGEOJSON. If you specify an invalid GeoJSON, the behavior of the function is undefined.
Syntax
SQL
Examples
In this example, the function converts an empty GeoJSON value of a
LINESTRING.
SQL
LINESTRING EMPTY
In this example, the function converts a GeoJSON value of a LINESTRING.
SQL
LINESTRING(1 1, 1 5, 5 5, 5 1)
ST_LINESTRING
Alias for ST_MAKELINE. Creates aLINESTRING based on the specified inputs.
ST_LINESTRING(geoArray) [#st_linestring-geoarray]
Creates aLINESTRING from the specified array of either LINESTRING or POINT values.
Syntax
SQL
Example
SQL
LINESTRING(1.000000 2.000000, 3.000000 4.000000)
ST_LINESTRING(binary)
Creates aLINESTRING from the specified BINARY. The BINARY value must be a LINESTRING in WKB format.
Syntax
SQL
Example
SQL
LINESTRING(1 2,3 4)
ST_LINESTRING(char) [#st_linestring-char]
Creates aLINESTRING from the specified CHAR. The CHAR value must be a LINESTRING in WKT format.
Syntax
SQL
Example
SQL
LINESTRING(1.000000 2.000000)
ST_LINESTRING(geo1, geo2) [#st_linestring-geo1-geo2]
Creates aLINESTRING consisting of two separate geographic arguments, both of which must be either a POINT or LINESTRING. You can mix geographic types, meaning one argument can be a POINT while the other is a LINESTRING.
Syntax
SQL
Example
SQL
LINESTRING(1.000000 2.000000, 1.000000 3.000000)

