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,
https://github.com/pygeos/pygeos/issues/233#issuecomment-943773401).

The GEOSGeom_setPrecision behaviour changed how it "collapses" geometries:

>>> pygeos.set_precision(pygeos.Geometry("LINESTRING (0 0, 0.1 0.1)"),
grid_size=1)
<pygeos.Geometry LINESTRING EMPTY>       # <-- with GEOS 3.9.1
<pygeos.Geometry LINESTRING (0 0, 0 0)>  # <-- with GEOS 3.10.0

>>> pygeos.set_precision(pygeos.Geometry("POLYGON ((0 0, 0.1 0, 0.1 0.1, 0
0.1, 0 0))"), grid_size=1)
<pygeos.Geometry POLYGON EMPTY>                        # <-- with GEOS
3.9.1
<pygeos.Geometry POLYGON ((0 0, 0 0, 0 0, 0 0, 0 0))>  # <-- with GEOS
3.10.0

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?
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.

Joris

On Thu, 14 Oct 2021 at 20:54, Paul Ramsey <pram...@cleverelephant.ca> wrote:

> I have pushed a couple small tweaks for this in ec7f996bc
> It's just rounding off regression results to avoid differences at the 14th
> digit, there's nothing important changing under the covers.
> P.
>
> > On Oct 14, 2021, at 11:27 AM, Sebastiaan Couwenberg <sebas...@xs4all.nl>
> wrote:
> >
> > Has postgis already been updated for geos 3.10?
> >
> > 3.1.4 has some test failures with it:
> >
> >
> https://ci.debian.net/data/autopkgtest/unstable/amd64/p/postgis/15944629/log.gz
> >
> https://ci.debian.net/data/autopkgtest/unstable/arm64/p/postgis/15944881/log.gz
> >
> > Kind Regards,
> >
> > Bas
> >
> > --
> > GPG Key ID: 4096R/6750F10AE88D4AF1
> > Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1
> > _______________________________________________
> > geos-devel mailing list
> > geos-devel@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/geos-devel
>
> _______________________________________________
> geos-devel mailing list
> geos-devel@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geos-devel
>
_______________________________________________
geos-devel mailing list
geos-devel@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geos-devel

Reply via email to