[PostGIS] #5601: A ST_Intersect row is missed when using JOIN.

PostGIS trac at osgeo.org
Tue Oct 31 05:30:22 PDT 2023


#5601: A ST_Intersect row is missed when using JOIN.
-----------------------+--------------------------
  Reporter:  Wenjing   |      Owner:  pramsey
      Type:  defect    |     Status:  new
  Priority:  critical  |  Milestone:  PostGIS GEOS
 Component:  postgis   |    Version:  3.4.x
Resolution:            |   Keywords:
-----------------------+--------------------------
Changes (by robe):

 * milestone:  PostGIS 3.5.0 => PostGIS GEOS

Comment:

 I get the expected 6.


 {{{
  SELECT COUNT(*) FROM t As a1 JOIN t As a2 ON ST_Intersects(a1.geom,
 a2.geom)  WHERE a1.id <> a2.id;
 }}}

 output: 6



 {{{
 SELECT a1.id, a2.id FROM t As a1 JOIN t As a2 ON ST_Intersects(a1.geom,
 a2.geom)  WHERE a1.id <> a2.id;
  id | id
 ----+----
   1 |  2
   1 |  3
   2 |  1
   2 |  3
   3 |  1
   3 |  2
 (6 rows)
 }}}


 What does this return for you?


 {{{
 SELECT postgis_full_version();
 }}}

 I have:


 {{{
 POSTGIS="3.4.0 3.4.0" [EXTENSION] PGSQL="160" GEOS="3.12.0-CAPI-1.18.0"
 SFCGAL="SFCGAL 1.4.1, CGAL 5.3, BOOST 1.78.0" PROJ="8.2.1
 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org
 USER_WRITABLE_DIRECTORY=C:\Windows\ServiceProfiles\NetworkService\AppData\Local/proj
 DATABASE_PATH=C:\Program
 Files\PostgreSQL\16\share\contrib\postgis-3.4\proj\proj.db"
 LIBXML="2.9.14" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0
 (Internal)"
 }}}


 I suspect this is a GEOS bug you are experiencing since most ST_Intersects
 except the simplest ones is handled by GEOS and I'm not seeing it on my
 end.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5601#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list