Skip to main content
Construct a Polygon from MinX, MinY, MaxX, MaxY, and an optional SRID.

Signatures

ST_MakeEnvelope(MinX: Double, MinY: Double, MaxX: Double, MaxY: Double)
ST_MakeEnvelope(MinX: Double, MinY: Double, MaxX: Double, MaxY: Double, srid: Integer)

Parameters

MinX
Double
required
The min x value.
MinY
Double
required
The min y value.
MaxX
Double
required
The max x value.
MaxY
Double
required
The max y value.
srid
Integer
Spatial Reference Identifier.

Return type

The resulting geometry.

Example

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