<div dir="ltr"><div>I was looking at our tests we run in PyGEOS with the main branch of GEOS, and noticed one issue I wanted to check with the GEOS developers (the other failures seem to be issues to fix in our tests, <a href="https://github.com/pygeos/pygeos/issues/233#issuecomment-943773401">https://github.com/pygeos/pygeos/issues/233#issuecomment-943773401</a>).</div><div><br></div>The GEOSGeom_setPrecision behaviour changed how it "collapses" geometries:<br><br><span style="font-family:monospace">>>> pygeos.set_precision(pygeos.Geometry("LINESTRING (0 0, 0.1 0.1)"), grid_size=1)<br><pygeos.Geometry LINESTRING EMPTY> # <-- with GEOS 3.9.1<br><pygeos.Geometry LINESTRING (0 0, 0 0)> # <-- with GEOS 3.10.0<br><br>>>> pygeos.set_precision(pygeos.Geometry("POLYGON ((0 0, 0.1 0, 0.1 0.1, 0 0.1, 0 0))"), grid_size=1)<br><pygeos.Geometry POLYGON EMPTY> # <-- with GEOS 3.9.1 <br><pygeos.Geometry POLYGON ((0 0, 0 0, 0 0, 0 0, 0 0))> # <-- with GEOS 3.10.0<br></span><div><br></div><div>So when the vertices are closer together than the new grid_size, it no longer creates empty geometries, but geometries with equal coordinates. Was this a deliberate change?<br></div><div>I don't really know if one or the other is preferred, but one consequence of the new result is that those returned geometries are no longer "valid" geometries.</div><div><br></div><div>Joris<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 14 Oct 2021 at 20:54, 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 have pushed a couple small tweaks for this in ec7f996bc<br>
It's just rounding off regression results to avoid differences at the 14th digit, there's nothing important changing under the covers.<br>
P.<br>
<br>
> On Oct 14, 2021, at 11:27 AM, Sebastiaan Couwenberg <<a href="mailto:sebastic@xs4all.nl" target="_blank">sebastic@xs4all.nl</a>> wrote:<br>
> <br>
> Has postgis already been updated for geos 3.10?<br>
> <br>
> 3.1.4 has some test failures with it:<br>
> <br>
> <a href="https://ci.debian.net/data/autopkgtest/unstable/amd64/p/postgis/15944629/log.gz" rel="noreferrer" target="_blank">https://ci.debian.net/data/autopkgtest/unstable/amd64/p/postgis/15944629/log.gz</a><br>
> <a href="https://ci.debian.net/data/autopkgtest/unstable/arm64/p/postgis/15944881/log.gz" rel="noreferrer" target="_blank">https://ci.debian.net/data/autopkgtest/unstable/arm64/p/postgis/15944881/log.gz</a><br>
> <br>
> Kind Regards,<br>
> <br>
> Bas<br>
> <br>
> -- <br>
> GPG Key ID: 4096R/6750F10AE88D4AF1<br>
> Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1<br>
> _______________________________________________<br>
> geos-devel mailing list<br>
> <a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
<br>
_______________________________________________<br>
geos-devel mailing list<br>
<a href="mailto:geos-devel@lists.osgeo.org" target="_blank">geos-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geos-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geos-devel</a><br>
</blockquote></div>