Skip to content
πŸŽ‰ Apache Sedona 1.9.1 is out now! πŸ—ΊοΈ Geography SQL functions, Box2D & Box3D types, raster Python UDFs & more. Read the release notes β†’

ST_MakeEnvelope

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

Format:

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

Return type: Geometry

SQL Example

SELECT ST_MakeEnvelope(1.234, 2.234, 3.345, 3.345, 4236)

Output:

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