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

It works the same as ST\_ExtentBasedSubDivide but returns new rows with geometries instead of list.

<img src="https://mintcdn.com/wherobots/fqh3gPDE0J25Lra_/images/sql-functions/ST_ExtentBasedSubDivide/ST_ExtentBasedSubDivide.svg?fit=max&auto=format&n=fqh3gPDE0J25Lra_&q=85&s=b6913b90e94412babbd690c8abb0f301" alt="ST_ExtentBasedSubDivideExplode" width="500" height="300" data-path="images/sql-functions/ST_ExtentBasedSubDivide/ST_ExtentBasedSubDivide.svg" />

## Signatures

```sql theme={"system"}
ST_ExtentBasedSubDivideExplode(geom: Geometry, maxWidth: Double, maxHeight: Double)
```

```sql theme={"system"}
ST_ExtentBasedSubDivideExplode(geom: Geometry, maxWidth: Double, maxHeight: Double, algorithms: String)
```

```sql theme={"system"}
ST_ExtentBasedSubDivideExplode(geom: Geometry, maxWidth: Double, maxHeight: Double, maxVertices: Integer, maxDepths, algorithms: String)
```

## Parameters

<ParamField body="geom" type="Geometry" required>
  The input geometry.
</ParamField>

<ParamField body="maxWidth" type="Double" required>
  The max width value.
</ParamField>

<ParamField body="maxHeight" type="Double" required>
  The max height value.
</ParamField>

<ParamField body="maxVertices" type="Integer">
  The maximum number of vertices.
</ParamField>

<ParamField body="maxDepths" type="Integer">
  The maximum recursion depth for subdivision.
</ParamField>

<ParamField body="algorithms" type="String">
  The algorithms value.
</ParamField>

## Example

```sql theme={"system"}
SELECT ST_ExtentBasedSubDivideExplode(ST_GeomFromText("LINESTRING(0 0, 85 85, 100 100, 120 120, 21 21, 10 10, 5 5)"), 30, 30)
```

```
+-----------------------------------------------------------------------------------------------------+
|geom                                                                                                 |
+-----------------------------------------------------------------------------------------------------+
|LINESTRING (0 0, 21.213203435596427 21.213203435596427)                                              |
|LINESTRING (21.213203435596427 21.213203435596427, 42.42640687119285 42.42640687119285)              |
|LINESTRING (42.42640687119285 42.42640687119285, 63.63961030678928 63.63961030678928)                |
|LINESTRING (63.63961030678928 63.63961030678928, 84.8528137423857 84.8528137423857)                  |
|LINESTRING (84.8528137423857 84.8528137423857, 85 85, 100 100, 106.06601717798213 106.06601717798213)|
|LINESTRING (106.06601717798213 106.06601717798213, 120 120, 112.72077938642144 112.72077938642144)   |
|LINESTRING (112.72077938642144 112.72077938642144, 91.50757595082501 91.50757595082501)              |
|LINESTRING (91.50757595082501 91.50757595082501, 70.29437251522859 70.29437251522859)                |
|LINESTRING (70.29437251522859 70.29437251522859, 49.08116907963216 49.08116907963216)                |
|LINESTRING (49.08116907963216 49.08116907963216, 27.86796564403574 27.86796564403574)                |
|LINESTRING (27.86796564403574 27.86796564403574, 21 21, 10 10, 6.654762208439314 6.654762208439314)  |
|LINESTRING (6.654762208439314 6.654762208439314, 5 5)                                                |
+-----------------------------------------------------------------------------------------------------+
```
