<div dir="ltr"><div dir="ltr">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.<div><br></div><div><font face="monospace">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))'));<br> st_astext <br>--------------------------------------------------------------------------------------------------------------------------------------------------<br> POLYGON((-71.25975582815524 42.470679599674035,-71.25956768540266 42.47056830210077,-71.25960032476851 42.4705131269523,-71.25978846752108 42.47062442452555,-71.25975582815524 42.470679599674035))<br></font></div><div><font face="monospace"><br></font></div><div><font face="monospace">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<br><br>POLYGON ((-71.25975582815524 42.470679599674035, -71.25956768540266 42.47056830210077, -71.25960032476851 42.4705131269523, -71.25978846752108 42.470624424525546, -71.25975582815524 42.470679599674035))</font><br></div><div><br></div><div><img src="cid:ii_ltj24h011" alt="image.png" width="497" height="461"><br></div><div><br></div><div>Is it possible the OP diagram is misleading? Hard to tell since the full output is not available.</div><div><br></div><div>@Erik: your repro is surprising. Can you post your query with output, and the postgis_full_version() ?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 8, 2024 at 9:47 AM Ricardo Mayerhofer <<a href="mailto:ricardo.ekm@gmail.com">ricardo.ekm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div>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.</div><div><br></div><div><br></div></div>
</blockquote></div></div>