ST_Intersect issue on Postgis 3.5.0

Erik Wienhold ewie at ewie.name
Wed Oct 16 03:18:12 PDT 2024


On 2024-10-16 07:59 +0200, Łukasz Szałek via postgis-users wrote:
> I have run a couple of tests on Postgresql 17 with Postgis 3.5.0
> Have you ever met such a situation that:
> 
> Case 1: On PG 15.3 with Postgis 3.3.7
> 
> POSTGIS="3.3.1 3786b21" [EXTENSION] PGSQL="150" GEOS="3.11.0-CAPI-1.17.0" PROJ="7.2.1" LIBXML="2.9.1" LIBJSON="0.11"
> 
> QUERY: SELECT st_intersects(ST_GeomFromText('LINESTRING(20.4181889 52.2294573, 20.4181297 52.2293530)',4326), ST_GeomFromText('POLYGON((20.4184446 52.2300275, 20.4184364 52.2299621, 20.4183278 52.2297000, 20.4182316 52.2294864, 20.4181977 52.2294529, 20.4181239 52.2294898, 20.4181889 52.2294573, 20.4182713 52.2295927, 20.4183541 52.2297635, 20.4184219 52.2299443, 20.4184446 52.2300275))',4326));
> 
> Produces:
> 
> ERROR:  GEOSIntersects: TopologyException: side location conflict at 20.418188900000001 52.2294573. This can occur if the input geometry is invalid.
> 
> Case 2: On PG17.0 with Postgis 3.5.0
> POSTGIS="3.5.0 d2c3ca4" [EXTENSION] PGSQL="170" GEOS="3.13.0-CAPI-1.19.0" PROJ="9.5.0 (compiled against PROJ 9.13.0) LIBXML="2.9.13" LIBJSON="0.14" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)"
> 
> Same QUERY: SELECT st_intersects(ST_GeomFromText('LINESTRING(20.4181889 52.2294573, 20.4181297 52.2293530)',4326),
> ST_GeomFromText('POLYGON((20.4184446 52.2300275, 20.4184364 52.2299621, 20.4183278 52.2297000, 20.4182316 52.2294864, 20.4181977 52.2294529, 20.4181239 52.2294898, 20.4181889 52.2294573, 20.4182713 52.2295927, 20.4183541 52.2297635, 20.4184219 52.2299443, 20.4184446 52.2300275))',4326));
> 
> Produces: True
> 
> Is it some kind of regression?

This could also be caused by the different libgeos versions (3.11.0 vs
3.13.0 in your case).  I've seen such errors with libgeos <=3.11,
whereas it worked with 3.12 on other setups with identical PostGIS
version and data.

-- 
Erik


More information about the postgis-users mailing list