ST_CROSSES()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
Returns 1 if the geometric value of the first argument crosses the geometric value of the second argument.
EXAMPLES
SET @poly1 = ST_GeomFromText('Polygon((0 0,1 1,2 2,0 0),(1 2,2 3,3 4,1 2))');
SET @poly2 = ST_GeomFromText('Polygon((1 1,2 2,3 3,1 1),(2 2,2 3,3 4,2 2))');
SELECT ST_Crosses(@poly1, @poly2);
+----------------------------+
| ST_Crosses(@poly1, @poly2) |
+----------------------------+
| 1 |
+----------------------------+
SET @poly1 = ST_GeomFromText('Polygon((0 0,1 1,2 2,0 0),(1 2,2 3,3 4,1 2))');
SET @poly2 = ST_GeomFromText('Polygon((5 5,5 10,10 15,5 5),(10 10,10 15,15 10,10 10))');
SELECT ST_Crosses(@poly1, @poly2);
+----------------------------+
| ST_Crosses(@poly1, @poly2) |
+----------------------------+
| 0 |
+----------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.