Skip to main content
Return the paths shared by two lineal Geometry columns. The result is a GeometryCollection containing two MultiLineStrings. The first contains paths traversed in the same direction by both inputs; the second contains paths traversed in opposite directions. Path coordinates follow the direction of a. Inputs must have matching SRIDs; the result retains that SRID. As in PostGIS, a non-empty result retains Z when either input has Z, while M values are dropped. SQL reference: ST_SharedPaths

Signature

Parameters

ColumnOrName
required
LineString or MultiLineString Geometry column.
ColumnOrName
required
Other LineString or MultiLineString Geometry column.

Returns

Column
Shared paths grouped by direction as a GeometryCollection column.