ST_MAKELINE
functionsupportedCore SQL functionsConstructs a GEOGRAPHY or GEOMETRY object that represents a line connecting the points in the input objects.
Syntax
ST_MAKELINE( <geography_expression_1> , <geography_expression_2> )
ST_MAKELINE( <geometry_expression_1> , <geometry_expression_2> )
Parameters
| Name | Required | Description |
|---|---|---|
geography_expression_1 | required | A GEOGRAPHY object containing the points to connect. This object must be a Point, MultiPoint, or LineString. |
geography_expression_2 | required | A GEOGRAPHY object containing the points to connect. This object must be a Point, MultiPoint, or LineString. |
geometry_expression_1 | required | A GEOMETRY object containing the points to connect. This object must be a Point, MultiPoint, or LineString. |
geometry_expression_2 | required | A GEOMETRY object containing the points to connect. This object must be a Point, MultiPoint, or LineString. |
Returns
The function returns a value of type GEOGRAPHY or GEOMETRY. The value is a LineString that connects all of the points specified by the input GEOGRAPHY or GEOMETRY objects.
Usage notes
- If an input GEOGRAPHY object contains multiple points, ST_MAKELINE connects all of the points specified in the object.
- ST_MAKELINE connects the points in the order in which they are specified in the input.
- For GEOMETRY objects, the function reports an error if the two input GEOMETRY objects have different SRIDs.
- For GEOMETRY objects, the returned GEOMETRY object has the same SRID as the input.