[PostGIS] #5647: Commit e85cd10 introduce a logic bug of ST_Covers

PostGIS trac at osgeo.org
Mon Dec 18 21:46:10 PST 2023


#5647: Commit e85cd10 introduce a logic bug of ST_Covers
---------------------+---------------------------
 Reporter:  Wenjing  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 3.4.2
Component:  postgis  |    Version:  3.4.x
 Keywords:           |
---------------------+---------------------------
 Consider the following statement:

 {{{

 SELECT ST_Covers(a1, a2) FROM ST_GeomFromText('MULTIPOLYGON(((1 0,0 1,-1
 0,0 -1, 1 0)))') As a1, ST_GeomFromText('MULTIPOINT(EMPTY,(0 0)) ') As a2;
 -- actual{f}, expected{t}

 }}}

 The result should be true, according to
 https://github.com/libgeos/geos/issues/988.
 It seems to be a regression bug.

 `git bisect` helps find the introducing commit: e85cd10.

 Using commit 66be3a6 to install PostGIS, the correct result can be
 obtained:

 {{{

 psql:script/simplify.sql:1: NOTICE:  lwgeom_api.c [352] called with n=0
 and npoints=0
  st_covers
 -----------
  t
 (1 row)

 }}}

 While when `git checkout e85cd10`, and install PostGIS,
 the incorrect result:

 {{{

  st_covers
 -----------
  f
 (1 row)

 }}}


 The version is the latest successful CI/CD build version.

 {{{

  POSTGIS="3.5.0dev 3.4.0rc1-839-g61bc019eb" [EXTENSION] PGSQL="170"
 GEOS="3.13.0dev-CAPI-1.18.0" PROJ="8.2.1 NETWORK_ENABLED=OFF
 URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj
 DATABASE_PATH=/usr/share/proj/proj.db" LIBXML="2.9.13" (core procs from
 "3.5.0dev 3.4.0rc1-750-g89fb96385" need upgrade)

 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5647>
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