Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
None
-
10.1.6-1
Description
Polygon and point, line and point
ST_Touches(POLYGON,POINT) and ST_Touches(LINESTRING,POINT) in some cases return true in 10.0 and PostgreSQL and false in 10.1:
10.1 |
MariaDB [test]> select ST_Touches(ST_LineFromText('LINESTRING(0 0,5 5)'),ST_PointFromText('POINT(0 0)')); |
+-----------------------------------------------------------------------------------+ |
| ST_Touches(ST_LineFromText('LINESTRING(0 0,5 5)'),ST_PointFromText('POINT(0 0)')) | |
+-----------------------------------------------------------------------------------+ |
| 0 |
|
+-----------------------------------------------------------------------------------+ |
1 row in set (0.00 sec) |
|
MariaDB [test]> select ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText('POINT(0 0)')); |
+-------------------------------------------------------------------------------------------------+ |
| ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText('POINT(0 0)')) | |
+-------------------------------------------------------------------------------------------------+ |
| 0 |
|
+-------------------------------------------------------------------------------------------------+ |
1 row in set (0.00 sec) |
10.0 |
MariaDB [test]> select ST_Touches(ST_LineFromText('LINESTRING(0 0,5 5)'),ST_PointFromText('POINT(0 0)')); |
+-----------------------------------------------------------------------------------+ |
| ST_Touches(ST_LineFromText('LINESTRING(0 0,5 5)'),ST_PointFromText('POINT(0 0)')) | |
+-----------------------------------------------------------------------------------+ |
| 1 |
|
+-----------------------------------------------------------------------------------+ |
1 row in set (0.00 sec) |
|
MariaDB [test]> select ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText('POINT(0 0)')); |
+-------------------------------------------------------------------------------------------------+ |
| ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText('POINT(0 0)')) | |
+-------------------------------------------------------------------------------------------------+ |
| 1 |
|
+-------------------------------------------------------------------------------------------------+ |
1 row in set (0.00 sec) |
PostgreSQL |
pgis=# select ST_Touches(ST_LineFromText('LINESTRING(0 0,5 5)'),ST_PointFromText('POINT(0 0)')); |
st_touches
|
------------
|
t
|
(1 row)
|
|
pgis=# select ST_Touches(ST_PolygonFromText('POLYGON((0 0,0 5,5 5,5 0,0 0))'),ST_PointFromText('POINT(0 0)')); |
st_touches
|
------------
|
t
|
(1 row)
|
Two identical points
ST_Touches(POINT,POINT) returns true in 10.0 and false in 10.1.
In PostgreSQL, it also returns false. I'm not sure which is correct, the definition of ST_Touches leaves it unclear for a degenerate object such as point.
10.0 |
MariaDB [test]> select ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')); |
+---------------------------------------------------------------------------+ |
| ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')) | |
+---------------------------------------------------------------------------+ |
| 1 |
|
+---------------------------------------------------------------------------+ |
1 row in set (0.00 sec) |
10.1 |
MariaDB [test]> select ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')); |
+---------------------------------------------------------------------------+ |
| ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')) | |
+---------------------------------------------------------------------------+ |
| 0 |
|
+---------------------------------------------------------------------------+ |
1 row in set (0.00 sec) |
PostgreSQL |
pgis=# select ST_Touches(ST_PointFromText('POINT(0 0)'),ST_PointFromText('POINT(0 0)')); |
st_touches
|
------------
|
f
|
(1 row)
|