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

Finds the largest circle that is contained within a (multi)polygon, or which does not overlap any lines and points. Returns a row with fields:

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

* `center` - center point of the circle
* `nearest` - nearest point from the center of the circle
* `radius` - radius of the circle

For polygonal geometries, the function inscribes the circle within the boundary rings, treating internal rings as additional constraints. When processing linear and point inputs, the algorithm inscribes the circle within the convex hull of the input, utilizing the input lines and points as additional boundary constraints.

## Signatures

```sql theme={"system"}
ST_MaximumInscribedCircle(geometry: Geometry)
```

## Parameters

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

## Return type

<ResponseField type="Struct<center: Geometry, nearest: Geometry, radius: Double>">
  A struct containing the result fields.
</ResponseField>

## Example

```sql theme={"system"}
SELECT inscribedCircle.* FROM (
    SELECT ST_MaximumIncribedCircle(ST_GeomFromWKT('POLYGON ((62.11 19.68, 60.79 17.20, 61.30 15.96, 62.11 16.08, 65.93 16.95, 66.20 20.61, 63.08 21.43, 64.48 18.70, 62.11 19.68))')) AS inscribedCircle
)
```

```
+---------------------------------------------+-------------------------------------------+------------------+
|center                                       |nearest                                    |radius            |
+---------------------------------------------+-------------------------------------------+------------------+
|POINT (62.794975585937514 17.774780273437496)|POINT (63.36773534817729 19.15992378007859)|1.4988916836219184|
+---------------------------------------------+-------------------------------------------+------------------+
```
