Hi Jon, This can be easily done via ST_PolygonFromEnvelope: https://sedona.apache.org/latest/api/sql/Constructor/#st_polygonfromenvelope
SELECT ST_PolygonFromEnvelope(tbl.minX, tbl.minY, tbl.maxX, tbl.maxY) FROM tbl Thanks, Jia On Tue, Apr 16, 2024 at 3:39 PM Jon Locke <jlo...@indicalab.com> wrote: > > All the examples I can find start with the assumption that you will create > a geometry column with some ST_ function and a single column number. What > if I need to create a geometry from multiple columns. For example, the data > I have has rectangular geometries in 4 columns: XMin, XMax, YMin, YMax. Is > there a way to deal with this in Sedona? > > Thanks! > > Jon > >