<div dir="ltr">Why do you think this result is wrong? It's the same as the result I'm seeing, and is an oriented rectangle enclosing the input (apart from minor issues with numerical precision).</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 8, 2024 at 12:32 PM Erik Wienhold <<a href="mailto:ewie@ewie.name">ewie@ewie.name</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">On 2024-03-08 20:36 +0100, Martin Davis wrote:<br>
> I can't reproduce this with GEOS 3.12 (either via PostGIS<br>
> ST_OrientedEnvelope or natively in GEOS). The output is rectangular and as<br>
> expected.<br>
> <br>
> SELECT ST_AsText(ST_OrientedEnvelope('POLYGON((-71.25961696926942<br>
> 42.470522973159675,-71.25978846747648 42.470624424600906,-71.25973918365264<br>
> 42.47066975346566,-71.25956768540266 42.47056830210077,-71.25961696926942<br>
> 42.470522973159675))'));<br>
> <br>
> st_astext<br>
> --------------------------------------------------------------------------------------------------------------------------------------------------<br>
> POLYGON((-71.25975582815524 42.470679599674035,-71.25956768540266<br>
> 42.47056830210077,-71.25960032476851 42.4705131269523,-71.25978846752108<br>
> 42.47062442452555,-71.25975582815524 42.470679599674035))<br>
> <br>
> bin/geosop -a "POLYGON((-71.25961696926942<br>
> 42.470522973159675,-71.25978846747648 42.470624424600906,-71.25973918365264<br>
> 42.47066975346566,-71.25956768540266 42.47056830210077,-71.25961696926942<br>
> 42.470522973159675))" minAreaRectangle<br>
> <br>
> POLYGON ((-71.25975582815524 42.470679599674035, -71.25956768540266<br>
> 42.47056830210077, -71.25960032476851 42.4705131269523, -71.25978846752108<br>
> 42.470624424525546, -71.25975582815524 42.470679599674035))<br>
> <br>
> [image: image.png]<br>
> <br>
> Is it possible the OP diagram is misleading? Hard to tell since the full<br>
> output is not available.<br>
> <br>
> @Erik: your repro is surprising. Can you post your query with output, and<br>
> the postgis_full_version() ?<br>
<br>
There you go:<br>
<br>
SELECT postgis_full_version();<br>
postgis_full_version <br>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------<br>
POSTGIS="3.4.1 POSTGIS_REVISION" [EXTENSION] (liblwgeom version mismatch: "3.4.1 ca035b9") PGSQL="160" GEOS="3.12.0-CAPI-1.18.0" PROJ="9.3.1 NETWORK_ENABLED=OFF URL_ENDPOINT=<a href="https://cdn.proj.org" rel="noreferrer" target="_blank">https://cdn.proj.org</a> USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" LIBXML="2.12.1" LIBJSON="0.17" LIBPROTOBUF="1.5.0" WAGYU="0.5.0 (Internal)" (core procs from "3.4.1 ca035b9" need upgrade)<br>
(1 row)<br>
<br>
SELECT st_astext(ST_OrientedEnvelope(<br>
'POLYGON((-71.25961696926942 42.470522973159675,<br>
-71.25978846747648 42.470624424600906,<br>
-71.25973918365264 42.47066975346566,<br>
-71.25956768540266 42.47056830210077,<br>
-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>
(1 row)<br>
<br>
-- <br>
Erik<br>
</blockquote></div>