Skip to content
Apache Sedona 1.9.0 is out now, featuring Spark 4.1 support, proj4sedona CRS transformation, Bing Tile functions, and more!

ST_LineMerge

Introduction: Returns a LineString or MultiLineString formed by sewing together the constituent line work of a MULTILINESTRING.

Note

Only works for MULTILINESTRING. Using other geometry will return a GEOMETRYCOLLECTION EMPTY. If no merging can be performed, the original MULTILINESTRING is returned.

ST_LineMerge

Format: ST_LineMerge (A:geometry)

Return type: Geometry

SELECT ST_LineMerge(geometry)
FROM df