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

Construct a Polygon from MinX, MinY, MaxX, MaxY, and an optional SRID.

## Signatures

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

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

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

<ParamField body="srid" type="Integer">
  Spatial Reference Identifier.
</ParamField>

## Return type

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

## Example

```sql theme={"system"}
SELECT ST_MakeEnvelope(1.234, 2.234, 3.345, 3.345, 4236)
```

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