<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Yep, that’s the answer, it’s an optical illusion. <div><br></div><div>Here’s the pair in 4326, green is (non-square) input, red is (square) output</div><div><br></div><div><img width="308" alt="PastedGraphic-2.png" src="cid:34BE193E-B7AC-4235-974F-42DF03794AA6"></div><div><br></div><div>And here they are in 3857, same coloring, but now the input looks square and the output nonsquare.</div><div><br></div><div><img width="310" alt="PastedGraphic-3.png" src="cid:75EB5C6E-07EF-4175-9CEE-38FA1CBB8F76"></div><div><br></div><div>P.</div><div><br></div><div><br><div><br><blockquote type="cite"><div>On Mar 8, 2024, at 2:04 PM, Tom Payne <twpayne@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div dir="ltr">Riccardo's original data is in EPSG:4326 (I assume) but Riccardo's screenshot is in EPSG:3857 (<a href="http://geosjon.io/">geosjon.io</a>'s default). Could this be the reason?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 8 Mar 2024 at 22:39, Paul Ramsey <<a href="mailto:pramsey@cleverelephant.ca">pramsey@cleverelephant.ca</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">I’m seeing the same thing as Martin, the output is rectangular. I see it using the JTS test builder. I see it using QGIS.<br>
<br>
This is the output, same as you get:<br>
<br>
POLYGON((-71.25975582815524 42.470679599674035,-71.25956768540266 42.47056830210077,-71.25960032476851 42.4705131269523,-71.25978846752108 42.470624424525546,-71.25975582815524 42.470679599674035))<br>
<br>
It is a rectangle. You can confirm by checking the angle between the first two edges.<br>
<br>
select degrees(st_angle('LINESTRING(-71.25975582815524 42.470679599674035,-71.25956768540266 42.47056830210077)', 'LINESTRING(-71.25956768540266 42.47056830210077,-71.25960032476851 42.4705131269523)'));<br>
<br>
Which is 90 degrees.<br>
<br>
P.<br>
<br>
> On Mar 8, 2024, at 1:29 PM, Erik Wienhold <<a href="mailto:ewie@ewie.name" target="_blank">ewie@ewie.name</a>> wrote:<br>
> <br>
> On 2024-03-08 21:40 +0100, Martin Davis wrote:<br>
>> Why do you think this result is wrong?<br>
> <br>
> Because I see that the resulting geometry is a parallelogram, as<br>
> reported by Ricardo.<br>
> <br>
>> It's the same as the result I'm seeing, and is an oriented rectangle<br>
>> enclosing the input (apart from minor issues with numerical<br>
>> precision).<br>
> <br>
> Are we seeing the same rendering?  Your PostGIS and geosop outputs are<br>
> the same as mine.  And I'm wondering where you got that rendering[1]<br>
> from that you've attached in your initial reply.  It shows a<br>
> parallelogram in blue as input and the correct oriented envelope in red<br>
> as result.  But it's not even the same parallelogram that Ricardo is<br>
> reporting.  Where did you get that input from?<br>
> <br>
> I attached the rendering of the input and output geometries that I got.<br>
> The geometries look identical to what Ricardo showed.<br>
> <br>
> [1] <a href="https://lists.osgeo.org/pipermail/postgis-users/attachments/20240308/e5c3247e/attachment.png" rel="noreferrer" target="_blank">https://lists.osgeo.org/pipermail/postgis-users/attachments/20240308/e5c3247e/attachment.png</a><br>
> <br>
> -- <br>
> Erik<br>
> <img.png><br>
<br>
</blockquote></div></div>
</div></blockquote></div><br></div></body></html>