[postgis-tickets] [PostGIS] #3678: Invalid geometry in a table returns conflicting ST_Intersects results

PostGIS trac at osgeo.org
Thu Dec 8 18:51:22 PST 2016


#3678: Invalid geometry in a table returns conflicting ST_Intersects results
---------------------+---------------------------
 Reporter:  mwtoews  |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 2.3.2
Component:  postgis  |    Version:  2.3.x
 Keywords:           |
---------------------+---------------------------
 In the example shown below, ST_Intersects returns both true and false for
 the same invalid LINESTRING on multiple rows of a table:
 {{{
 DROP TABLE IF EXISTS invalid;

 CREATE TEMP TABLE invalid(id serial primary key, geom geometry);
 INSERT INTO invalid(geom)
 SELECT 'LINESTRING(-85.6600021 30.7976979,-85.6600021 30.7976979)' FROM
 generate_series(1, 3);

 SELECT id, ST_Intersects('LINESTRING(-85.6600021 30.7976979,-85.6600021
 30.7976979)', geom)
 FROM invalid;
  id | st_intersects
 ----+---------------
   1 | f
   2 | t
   3 | t
 (3 rows)
 }}}
 Spatial predicates from both JTS and GEOS have no love for invalid
 geometries, and this should normally be false, as they are essentially
 regarded to be disjoint (FFFFFFFF2). All rows are true with ST_Disjoint.

 This issue comes from [http://stackoverflow.com/q/41009805/327026 the
 wild].

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