Changes between Version 5 and Version 6 of Ticket #5580


Ignore:
Timestamp:
10/19/23 23:42:09 (13 months ago)
Author:
Wenjing
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5580 – Description

    v5 v6  
    11Consider this query:
     2{{{
     3SELECT
     4ST_3DIntersects(a1, a2)
     5FROM ST_GeomFromText('GEOMETRYCOLLECTION Z (POINT Z EMPTY, POINT Z (0 0 0))') As a1
     6, ST_GeomFromText('POINT Z (0 0 0)') As a2;
     7--excepted{t}; actual{f}
     8}}}
     9Postgis produces a result of false, but I expected it to produce true. I think this is a bug, due to the following 3 reasons:
    210
     111. ST_3DIntersection(a1, a2) returns POINT Z (0 0 0). So the excepted result of 3DIntersects is true.
     12
     132. Considering the 2D version function, ST_Intersects(a1, a2) returns true here:
    314{{{
    415SELECT
     
    819--expected{t}
    920}}}
    10 When using the 2D Intersects function in this situation, the expected result is true because POINT(0 0) is the two geometries' intersection. PostGIS returns true.
    1121
    12 But consider its 3D version:
    13 {{{
    14 SELECT
    15 ST_3DIntersects(a1, a2)
    16 FROM ST_GeomFromText('GEOMETRYCOLLECTION Z (POINT Z EMPTY, POINT Z (0 0 0))') As a1
    17 , ST_GeomFromText('POINT Z (0 0 0)') As a2;
    18 --expected{t}; actual{f}
    19 }}}
    20 POINT Z (0 0 0) is the two geometries' intersection. So the excepted result of 3DIntersects is true.
     223. Making the empty point position behind POINT Z (0 0 0), ST_3DIntersection(a1, a2) returns true.
    2123
    22 But the 3DIntersects function doesn't consider they intersect only when inserting an empty geometry before this point.
    2324