> ## 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.

# GeoSeries.line_merge

> Return merged LineStrings.

Return merged LineStrings.

Returns a `GeoSeries` of (Multi)LineStrings, where connected
LineStrings are merged together into single LineStrings.

## Signature

```python theme={"system"}
line_merge(directed=False)
```

## Parameters

<ParamField path="directed" type="bool" default="False">
  Only `directed=False` is supported. Passing `directed=True`
  will raise `NotImplementedError`.
</ParamField>

## Returns

<ResponseField name="return" type="GeoSeries" />

## Examples

```python theme={"system"}
>>> from sedona.spark.geopandas import GeoSeries
>>> from shapely.geometry import MultiLineString
>>> s = GeoSeries(
...     [
...         MultiLineString([[(0, 0), (1, 1)], [(1, 1), (2, 2)]]),
...         MultiLineString([[(0, 0), (1, 1)], [(2, 2), (3, 3)]]),
...     ]
... )
>>> s.line_merge()
0                     LINESTRING (0 0, 1 1, 2 2)
1    MULTILINESTRING ((0 0, 1 1), (2 2, 3 3))
dtype: geometry
```


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