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

# GeoDataFrame.segmentize

> Returns a GeoSeries with vertices added to line segments based on maximum segment length.

Returns a `GeoSeries` with vertices added to line segments based on
maximum segment length.

Additional vertices will be added to every line segment in an input geometry so
that segments are no longer than the provided maximum segment length. New
vertices will evenly subdivide each segment. Only linear components of input
geometries are densified; other geometries are returned unmodified.

## Signature

```python theme={"system"}
segmentize(max_segment_length)
```

## Parameters

<ParamField path="max_segment_length" type="float | array - like" required>
  Additional vertices will be added so that all line segments are no longer
  than this value. Must be greater than 0.
</ParamField>

## Returns

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

## Examples

```python theme={"system"}
>>> from sedona.spark.geopandas import GeoSeries
>>> from shapely.geometry import Polygon, LineString
>>> s = GeoSeries(
...     [
...         LineString([(0, 0), (0, 10)]),
...         Polygon([(0, 0), (10, 0), (10, 10), (0, 10), (0, 0)]),
...     ],
... )
>>> s
0                     LINESTRING (0 0, 0 10)
1    POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))
dtype: geometry
```

```python theme={"system"}
>>> s.segmentize(max_segment_length=5)
0                          LINESTRING (0 0, 0 5, 0 10)
1    POLYGON ((0 0, 5 0, 10 0, 10 5, 10 10, 5 10, 0...
dtype: geometry
```


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