Unexpected behaviour in ST_Relate with PostGIS 3.5 and GEOS 3.13

David Smith smithdc at gmail.com
Fri Jul 4 06:56:14 PDT 2025


Hi all,

I was unsure how best to ask this question. If this is the wrong place I'd
appreciate being pointed in the right direction.

When trying to add support to Django's GeoDjango for PostGIS 3.5 and GEOS
3.13 there is one test failure. I managed to summarise it to this example
in sql. I'm not an SQL expert, so I used Claude.ai to help me write this.

Some of the values being input are quite long, so here's a gist:

https://gist.github.com/smithdc1/e8429f70b74bc97cd2a0a3a6193d5949

The first part is set up, which creates two tables and adds some data. The
two SELECT statements at the end show the issue. `ST_Relate()`, when a
pattern is provided, seems to only work for the first result.

The first query returns `False` for Lawrence being within Kansas, but is
`True` (the correct result) if it is the only row the function is applied
to. `True` is also returned if Lawrence is the first row, rather than the
second, in the table.

I was wondering if this change in behaviour in PostGIS 3.5 / GEOS 3.13 is
expected?

Thanks
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20250704/4113cf22/attachment.htm>


More information about the postgis-devel mailing list