Changes between Version 5 and Version 6 of Ticket #5580
- Timestamp:
- 10/19/23 23:42:09 (13 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5580 – Description
v5 v6 1 1 Consider this query: 2 {{{ 3 SELECT 4 ST_3DIntersects(a1, a2) 5 FROM 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 }}} 9 Postgis produces a result of false, but I expected it to produce true. I think this is a bug, due to the following 3 reasons: 2 10 11 1. ST_3DIntersection(a1, a2) returns POINT Z (0 0 0). So the excepted result of 3DIntersects is true. 12 13 2. Considering the 2D version function, ST_Intersects(a1, a2) returns true here: 3 14 {{{ 4 15 SELECT … … 8 19 --expected{t} 9 20 }}} 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.11 21 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. 22 3. Making the empty point position behind POINT Z (0 0 0), ST_3DIntersection(a1, a2) returns true. 21 23 22 But the 3DIntersects function doesn't consider they intersect only when inserting an empty geometry before this point.23 24