> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_SharedPaths (Python)

> Return the paths shared by two lineal Geometry columns.

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`](/reference/wherobots-db/geometry-data/overlay/ST_SharedPaths)

## Signature

```python theme={"system"}
from sedona.spark.sql.st_functions import ST_SharedPaths

ST_SharedPaths(a: ColumnOrName, b: ColumnOrName) -> Column
```

## Parameters

<ParamField path="a" type="ColumnOrName" required>
  LineString or MultiLineString Geometry column.
</ParamField>

<ParamField path="b" type="ColumnOrName" required>
  Other LineString or MultiLineString Geometry column.
</ParamField>

## Returns

<ResponseField name="return" type="Column">
  Shared paths grouped by direction as a GeometryCollection column.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.