<div dir="ltr">Please use GEOSNormalize / ST_Normalize or other equivalents before comparing geometries between library versions. The starting point in the ring can change because of different optimizations, and GEOS 3.9 was a complete rewrite of the geometry overlay subsystem.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 27, 2021 at 9:02 PM Kai Mühlbauer <<a href="mailto:kai.muehlbauer@uni-bonn.de">kai.muehlbauer@uni-bonn.de</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">Hi,<br>
<br>
this might be a silly problem or no problem at all, but I currently <br>
can't wrap my head around it.<br>
<br>
I'm using python bindings of GDAL OGR with GEOS support for layer <br>
intersection since several years now. Now suddenly my testsuit which <br>
checks intersection of two boxes breaks since the intersecting box <br>
starts now with a different starting point (all four points of the box <br>
fit with the earlier tests).<br>
<br>
The change took place between versions GDAL 3.2.0 -> 3.2.1, GEOS 3.8.1 <br>
-> 3.9.1 and PROJ 7.1.1 -> 7.2.0. I've tried to find anything what might <br>
have changed in the release notes of GDAL and GEOS, but couldn't.<br>
<br>
So if anyone has a clue what's going on or what has changed and can <br>
point me to the relevant resources, I would greatly appreciate it.<br>
<br>
Below you find the geometries I uses as JSON strings and the differing <br>
intersection.<br>
<br>
src<br>
'{ "type": "Polygon", "coordinates": [ [ [ 1.0, 1.0, 0.0 ], [ 1.0, 2.0, <br>
0.0 ], [ 2.0, 2.0, 0.0 ], [ 2.0, 1.0, 0.0 ], [ 1.0, 1.0, 0.0 ] ] ] }'<br>
<br>
trg<br>
'{ "type": "Polygon", "coordinates": [ [ [ 0.5, 0.5, 0.0 ], [ 0.5, 1.5, <br>
0.0 ], [ 1.5, 1.5, 0.0 ], [ 1.5, 0.5, 0.0 ], [ 0.5, 0.5, 0.0 ] ] ] }'<br>
<br>
trg.Intersection(src) (GDAL 3.2.0, GEOS 3.8.1, PROJ 7.1.1)<br>
'{ "type": "Polygon", "coordinates": [ [ [ 1.0, 1.5, 0.0 ], [ 1.5, 1.5, <br>
0.0 ], [ 1.5, 1.0, 0.0 ], [ 1.0, 1.0, 0.0 ], [ 1.0, 1.5, 0.0 ] ] ] }'<br>
<br>
trg.Intersection(src) (GDAL 3.2.1, GEOS 3.9.1, PROJ 7.2.0)<br>
'{ "type": "Polygon", "coordinates": [ [ [ 1.5, 1.5, 0.0 ], [ 1.5, 1.0, <br>
0.0 ], [ 1.0, 1.0, 0.0 ], [ 1.0, 1.5, 0.0 ], [ 1.5, 1.5, 0.0 ] ] ] }'<br>
<br>
Thanks in advance!<br>
<br>
Cheers,<br>
Kai<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Darafei "Komяpa" Praliaskouski<br>OSM BY Team - <a href="http://openstreetmap.by/" target="_blank">http://openstreetmap.by/</a><br></div></div>