I can't reproduce this with GEOS 3.12 (either via PostGIS ST_OrientedEnvelope or natively in GEOS). The output is rectangular and as expected.
SELECT ST_AsText(ST_OrientedEnvelope('POLYGON((-71.25961696926942 42.470522973159675,-71.25978846747648 42.470624424600906,-71.25973918365264 42.47066975346566,-71.25956768540266 42.47056830210077,-71.25961696926942 42.470522973159675))')); st_astext -------------------------------------------------------------------------------------------------------------------------------------------------- POLYGON((-71.25975582815524 42.470679599674035,-71.25956768540266 42.47056830210077,-71.25960032476851 42.4705131269523,-71.25978846752108 42.47062442452555,-71.25975582815524 42.470679599674035)) bin/geosop -a "POLYGON((-71.25961696926942 42.470522973159675,-71.25978846747648 42.470624424600906,-71.25973918365264 42.47066975346566,-71.25956768540266 42.47056830210077,-71.25961696926942 42.470522973159675))" minAreaRectangle POLYGON ((-71.25975582815524 42.470679599674035, -71.25956768540266 42.47056830210077, -71.25960032476851 42.4705131269523, -71.25978846752108 42.470624424525546, -71.25975582815524 42.470679599674035)) [image: image.png] Is it possible the OP diagram is misleading? Hard to tell since the full output is not available. @Erik: your repro is surprising. Can you post your query with output, and the postgis_full_version() ? On Fri, Mar 8, 2024 at 9:47 AM Ricardo Mayerhofer <ricardo....@gmail.com> wrote: > Hi all, > I have a GIS application with multiple polygons where I'd like to get the > rotated bounding box of the polygons. ST_OrientedEnvelope seems to be the > right function, but in my case, is returning a parallelogram instead of a > rectangle. > > >