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

Construct a Polygon from MinX, MinY, MaxX, MaxY.

## Signatures

```sql theme={"system"}
ST_PolygonFromEnvelope (MinX: Double, MinY: Double, MaxX: Double, MaxY: Double)
```

## Parameters

<ParamField body="MinX" type="Double" required>
  The min x value.
</ParamField>

<ParamField body="MinY" type="Double" required>
  The min y value.
</ParamField>

<ParamField body="MaxX" type="Double" required>
  The max x value.
</ParamField>

<ParamField body="MaxY" type="Double" required>
  The max y value.
</ParamField>

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_PolygonFromEnvelope(double(1.234),double(2.234),double(3.345),double(3.345))
```

```
POLYGON ((1.234 2.234, 1.234 3.345, 3.345 3.345, 3.345 2.234, 1.234 2.234))
```
