config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/gis/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/gis/r/spatial_op_testingfunc_mix.result

#Creating the spatial Geometry object
USE test;
CREATE TABLE gis_geometrycollection (fid INTEGER NOT NULL PRIMARY KEY, g GEOMETRY);
SET @star_elem_vertical= 'POLYGON((5 0,15 25,25 0,15 5,5 0))';
SET @star_elem_horizontal= 'POLYGON((25 0,0 15,30 15,22 10,25 0))';
SET @star_center= 'POINT(15 10)';
SET @star_top= 'POINT(15 25)';
SET @star_bottom_left= 'POINT(5 0)';
SET @star_bottom_right= 'POINT(25 0)';
SET @star_bottom_points= 'MULTIPOINT(5 0,25 0)';
SET @star_all_points= 'MULTIPOINT(5 0,25 0,15 10,15 25)';
SET @star_line_horizontal= 'LINESTRING(10 15,20 15)';
SET @star_line_vertical= 'LINESTRING(15 5,15 25)';
SET @star_top_to_center= 'LINESTRING(15 25,15 10)';
SET @star_lines_near_horizontal= 'MULTILINESTRING((25 0,0 15,15 30,0 5))';
SET @star_lines_near_vertical= 'MULTILINESTRING((0 5,15 25,0 25))';
SET @star= 'POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0))';
SET @star_elem_vertical_val= '((5 0,15 25,25 0,15 5,5 0))';
SET @star_elem_horizontal_val= '((25 0,0 15,30 15,22 10,25 0))';
SET @star_of_elems='MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0)))';
SET @star_elem_vertical_1= 'POLYGON((5 0,15 25,25 0,15 5,5 0))';
SET @star_elem_horizontal_1= 'POLYGON((25 0,0 15,30 15,22 10,25 0))';
SET @star_center_1= 'POINT(15 10)';
SET @star_top_1= 'POINT(15 25)';
SET @star_bottom_left_1= 'POINT(5 0)';
SET @star_bottom_right_1= 'POINT(25 0)';
SET @star_bottom_points_1= 'MULTIPOINT(5 0,25 0)';
SET @star_all_points_1= 'MULTIPOINT(5 0,25 0,15 10,15 25)';
SET @star_line_horizontal_1= 'LINESTRING(10 15,20 15)';
SET @star_line_vertical_1= 'LINESTRING(15 5,15 25)';
SET @star_top_to_center_1= 'LINESTRING(15 25,15 10)';
SET @star_lines_near_horizontal_1= 'MULTILINESTRING((25 0,0 15,15 30,0 5))';
SET @star_lines_near_vertical_1= 'MULTILINESTRING((0 5,15 25,0 25))';
SET @star_1= 'POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0))';
SET @star_elem_vertical_val_1= '((5 0,15 25,25 0,15 5,5 0))';
SET @star_elem_horizontal_val_1= '((25 0,0 15,30 15,22 10,25 0))';
SET @star_of_elems_1='MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0)))';
SET @star_elem_vertical_2= 'POLYGON((15 0,25 25,35 0,25 5,15 0))';
SET @star_elem_horizontal_2= 'POLYGON((35 0,10 15,40 15,32 10,35 0))';
SET @star_center_2= 'POINT(25 10)';
SET @star_top_2= 'POINT(25 25)';
SET @star_bottom_left_2= 'POINT(15 0)';
SET @star_bottom_right_2= 'POINT(35 0)';
SET @star_bottom_points_2= 'MULTIPOINT(15 0,35 0)';
SET @star_all_points_2= 'MULTIPOINT(15 0,35 0,35 10,25 25)';
SET @star_line_horizontal_2= 'LINESTRING(20 15,30 15)';
SET @star_line_vertical_2= 'LINESTRING(25 5,25 25)';
SET @star_top_to_center_2= 'LINESTRING(25 25,25 10)';
SET @star_lines_near_horizontal_2= 'MULTILINESTRING((35 0,10 15,25 30,10 5))';
SET @star_lines_near_vertical_2= 'MULTILINESTRING((10 5,25 25,10 25))';
SET @star_2= 'POLYGON((15 0,17 10,10 15,20 15,25 25,30 15,40 15,32 10,35 0,25 5,15 0))';
SET @star_elem_vertical_val_2= '((15 0,25 25,35 0,25 5,15 0))';
SET @star_elem_horizontal_val_2= '((35 0,10 15,40 15,32 10,35 0))';
SET @star_of_elems_2='MULTIPOLYGON(((15 0,25 25,35 0,25 5,15 0)),((35 0,10 15,40 15,32 10,35 0)))';
SET @star_elem_vertical_3= 'POLYGON((65 0,75 25,85 0,75 5,65 0))';
SET @star_elem_horizontal_3= 'POLYGON((85 0,60 15,90 15,82 10,85 0))';
SET @star_center_3= 'POINT(75 10)';
SET @star_top_3= 'POINT(75 25)';
SET @star_bottom_left_3= 'POINT(65 0)';
SET @star_bottom_right_3= 'POINT(85 0)';
SET @star_bottom_points_3= 'MULTIPOINT(65 0,85 0)';
SET @star_all_points_3= 'MULTIPOINT(65 0,85 0,75 10,75 25)';
SET @star_line_horizontal_3= 'LINESTRING(70 15,80 15)';
SET @star_line_vertical_3= 'LINESTRING(75 5,75 25)';
SET @star_top_to_center_3= 'LINESTRING(75 25,75 10)';
SET @star_lines_near_horizontal_3= 'MULTILINESTRING((85 0,60 15,85 30,60 5))';
SET @star_lines_near_vertical_3= 'MULTILINESTRING((60 5,75 25,60 25))';
SET @star_3= 'POLYGON((65 0,67 10,60 15,70 15,75 25,80 15,90 15,82 10,85 0,75 5,65 0))';
SET @star_elem_vertical_val_3= '((65 0,75 25,85 0,75 5,65 0))';
SET @star_elem_horizontal_val_3= '((85 0,60 15,90 15,82 10,85 0))';
SET @star_of_elems_3='MULTIPOLYGON(((65 0,75 25,85 0,75 5,65 0)),((85 0,60 15,90 15,82 10,85 0)))';
#INSERT base star
INSERT INTO gis_geometrycollection VALUES
(100,ST_GEOMFROMTEXT(@star)),
(101,ST_GEOMFROMTEXT(@star_elem_vertical)),
(102,ST_GEOMFROMTEXT(@star_elem_horizontal)),
(103,ST_GEOMFROMTEXT(@star_of_elems)),
(104,ST_GEOMFROMTEXT(@star_top)),
(105,ST_GEOMFROMTEXT(@star_center)),
(106,ST_GEOMFROMTEXT(@star_bottom_left)),
(107,ST_GEOMFROMTEXT(@star_bottom_right)),
(108,ST_GEOMFROMTEXT(@star_bottom_points)),
(109,ST_GEOMFROMTEXT(@star_all_points)),
(110,ST_GEOMFROMTEXT(@star_line_horizontal)),
(111,ST_GEOMFROMTEXT(@star_line_vertical)),
(112,ST_GEOMFROMTEXT(@star_top_to_center)),
(113,ST_GEOMFROMTEXT(@star_lines_near_horizontal)),
(114,ST_GEOMFROMTEXT(@star_lines_near_vertical));
#INSERT identical (to base) star
INSERT INTO gis_geometrycollection VALUES
(200,ST_GEOMFROMTEXT(@star_1)),
(201,ST_GEOMFROMTEXT(@star_elem_vertical_1)),
(202,ST_GEOMFROMTEXT(@star_elem_horizontal_1)),
(203,ST_GEOMFROMTEXT(@star_of_elems_1)),
(204,ST_GEOMFROMTEXT(@star_top_1)),
(205,ST_GEOMFROMTEXT(@star_center_1)),
(206,ST_GEOMFROMTEXT(@star_bottom_left_1)),
(207,ST_GEOMFROMTEXT(@star_bottom_right_1)),
(208,ST_GEOMFROMTEXT(@star_bottom_points_1)),
(209,ST_GEOMFROMTEXT(@star_all_points_1)),
(210,ST_GEOMFROMTEXT(@star_line_horizontal_1)),
(211,ST_GEOMFROMTEXT(@star_line_vertical_1)),
(212,ST_GEOMFROMTEXT(@star_top_to_center_1)),
(213,ST_GEOMFROMTEXT(@star_lines_near_horizontal_1)),
(214,ST_GEOMFROMTEXT(@star_lines_near_vertical_1));
#INSERT overlapping star
INSERT INTO gis_geometrycollection VALUES
(300,ST_GEOMFROMTEXT(@star_2)),
(301,ST_GEOMFROMTEXT(@star_elem_vertical_2)),
(302,ST_GEOMFROMTEXT(@star_elem_horizontal_2)),
(303,ST_GEOMFROMTEXT(@star_of_elems_2)),
(304,ST_GEOMFROMTEXT(@star_top_2)),
(305,ST_GEOMFROMTEXT(@star_center_2)),
(306,ST_GEOMFROMTEXT(@star_bottom_left_2)),
(307,ST_GEOMFROMTEXT(@star_bottom_right_2)),
(308,ST_GEOMFROMTEXT(@star_bottom_points_2)),
(309,ST_GEOMFROMTEXT(@star_all_points_2)),
(310,ST_GEOMFROMTEXT(@star_line_horizontal_2)),
(311,ST_GEOMFROMTEXT(@star_line_vertical_2)),
(312,ST_GEOMFROMTEXT(@star_top_to_center_2)),
(313,ST_GEOMFROMTEXT(@star_lines_near_horizontal_2)),
(314,ST_GEOMFROMTEXT(@star_lines_near_vertical_2));
#INSERT seperate star
INSERT INTO gis_geometrycollection VALUES
(400,ST_GEOMFROMTEXT(@star_3)),
(401,ST_GEOMFROMTEXT(@star_elem_vertical_3)),
(402,ST_GEOMFROMTEXT(@star_elem_horizontal_3)),
(403,ST_GEOMFROMTEXT(@star_of_elems_3)),
(404,ST_GEOMFROMTEXT(@star_top_3)),
(405,ST_GEOMFROMTEXT(@star_center_3)),
(406,ST_GEOMFROMTEXT(@star_bottom_left_3)),
(407,ST_GEOMFROMTEXT(@star_bottom_right_3)),
(408,ST_GEOMFROMTEXT(@star_bottom_points_3)),
(409,ST_GEOMFROMTEXT(@star_all_points_3)),
(410,ST_GEOMFROMTEXT(@star_line_horizontal_3)),
(411,ST_GEOMFROMTEXT(@star_line_vertical_3)),
(412,ST_GEOMFROMTEXT(@star_top_to_center_3)),
(413,ST_GEOMFROMTEXT(@star_lines_near_horizontal_3)),
(414,ST_GEOMFROMTEXT(@star_lines_near_vertical_3));
CREATE TABLE gis_geometrycollection_2 SELECT fid as fid2,g as g2 FROM gis_geometrycollection;
#Checking the integrity of the above create/insert statements 
#60 rows. 
SELECT count(ST_ASTEXT(g) != 'NULL') FROM gis_geometrycollection;
count(ST_ASTEXT(g) != 'NULL')
60
#60 rows. 
SELECT count(ST_ASTEXT(g2) != 'NULL') FROM gis_geometrycollection_2;
count(ST_ASTEXT(g2) != 'NULL')
60
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star));
ST_ASTEXT(ST_GEOMFROMTEXT(@star))
POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0))
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_vertical));
ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_vertical))
POLYGON((5 0,15 25,25 0,15 5,5 0))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
MULTIPOLYGON(((15 25,25 0,22 10,30 15,20 15,15 25)),((15 25,10 15,0 15,7 10,5 0,15 25)))
SELECT ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
POLYGON((7 10,5 0,15 5,25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10))
SELECT ST_EQUALS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_EQUALS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_EQUALS(g,ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
FROM gis_geometrycollection WHERE fid=100;
ST_EQUALS(g,ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_DISJOINT(ST_GEOMFROMTEXT(@star),ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_DISJOINT(ST_GEOMFROMTEXT(@star),ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
0
SELECT ST_DISJOINT(g,ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
FROM gis_geometrycollection WHERE fid=100;
ST_DISJOINT(g,ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
0
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
MULTIPOLYGON(((15 25,25 0,22 10,30 15,20 15,15 25)),((15 25,10 15,0 15,7 10,5 0,15 25)))
SELECT ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
POLYGON((7 10,5 0,15 5,25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10))
SELECT ST_EQUALS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_EQUALS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_EQUALS(g,ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
FROM gis_geometrycollection WHERE fid=100;
ST_EQUALS(g,ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_INTERSECTS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_INTERSECTS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_INTERSECTS(g,ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
FROM gis_geometrycollection WHERE fid=100;
ST_INTERSECTS(g,ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_ASTEXT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
POLYGON((15 25,5 0,15 5,25 0,15 25))
SELECT ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
POLYGON((25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0))
SELECT ST_EQUALS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_EQUALS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_EQUALS(g,ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
FROM gis_geometrycollection WHERE fid=100;
ST_EQUALS(g,ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_CONTAINS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)));
ST_CONTAINS(ST_GEOMFROMTEXT(@star),ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_CONTAINS(g,ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
FROM gis_geometrycollection WHERE fid=100;
ST_CONTAINS(g,ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star)))
1
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star));
ST_ASTEXT(ST_GEOMFROMTEXT(@star))
POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0))
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_vertical));
ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_vertical))
POLYGON((5 0,15 25,25 0,15 5,5 0))
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_horizontal));
ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_horizontal))
POLYGON((25 0,0 15,30 15,22 10,25 0))
SELECT ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)))
POLYGON((8.870967741935484 9.67741935483871,5 0,15 5,25 0,22 10,30 15,19 15,15 25,11 15,0 15,8.870967741935484 9.67741935483871))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)))
MULTIPOLYGON(((11 15,19 15,15 25,11 15)),((10 15,0 15,8.870967741935484 9.67741935483871,5 0,15 5,15.90909090909091 4.545454545454546,17 10,10 15)),((23.695652173913043 4.3478260869565215,20 2.5,25 0,23.695652173913043 4.3478260869565215)),((15.909090909090908 4.545454545454546,15 0,20 2.5,15.909090909090908 4.545454545454546)),((20 15,30 15,25 25,20 15)),((30 15,22 10,23.695652173913043 4.3478260869565215,25 5,35 0,32 10,40 15,30 15)))
SELECT ST_WITHIN(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1));
ST_WITHIN(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1))
0
SELECT ST_OVERLAPS(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1));
ST_OVERLAPS(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1))
1
SELECT ST_CROSSES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1));
ST_CROSSES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1))
0
SELECT ST_CROSSES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_1));
ST_CROSSES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_1))
0
SELECT ST_CROSSES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_2));
ST_CROSSES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_2))
0
SELECT ST_TOUCHES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_1));
ST_TOUCHES(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_1))
1
SELECT ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)))
POLYGON((8.870967741935484 9.67741935483871,5 0,15 5,25 0,22 10,30 15,19 15,15 25,11 15,0 15,8.870967741935484 9.67741935483871))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)));
ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)))
MULTIPOLYGON(((11 15,19 15,15 25,11 15)),((10 15,0 15,8.870967741935484 9.67741935483871,5 0,15 5,15.90909090909091 4.545454545454546,17 10,10 15)),((23.695652173913043 4.3478260869565215,20 2.5,25 0,23.695652173913043 4.3478260869565215)))
SELECT ST_WITHIN(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1));
ST_WITHIN(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1))
1
SELECT ST_OVERLAPS(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1));
ST_OVERLAPS(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1))
0
SELECT ST_CROSSES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1));
ST_CROSSES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_1))
0
SELECT ST_CROSSES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_1));
ST_CROSSES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_1))
0
SELECT ST_CROSSES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_2));
ST_CROSSES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_to_center_2))
0
SELECT ST_TOUCHES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_1));
ST_TOUCHES(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),ST_GEOMFROMTEXT(@star_2)),
ST_GEOMFROMTEXT(@star_top_1))
1
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star));
ST_ASTEXT(ST_GEOMFROMTEXT(@star))
POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0))
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_vertical));
ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_vertical))
POLYGON((5 0,15 25,25 0,15 5,5 0))
SELECT ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_horizontal));
ST_ASTEXT(ST_GEOMFROMTEXT(@star_elem_horizontal))
POLYGON((25 0,0 15,30 15,22 10,25 0))
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with ST_UNION()
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CONTAINS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_EQUALS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_EQUALS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_DISJOINT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_DISJOINT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_INTERSECTS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_INTERSECTS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
SELECT ST_CROSSES(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CROSSES(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_TOUCHES(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_TOUCHES(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_WITHIN(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_WITHIN(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
SELECT ST_OVERLAPS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_OVERLAPS(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with ST_DIFFERENCE()
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CONTAINS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_EQUALS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_EQUALS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_DISJOINT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_DISJOINT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_INTERSECTS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_INTERSECTS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
SELECT ST_CROSSES(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CROSSES(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_TOUCHES(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_TOUCHES(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_WITHIN(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_WITHIN(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
SELECT ST_OVERLAPS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_OVERLAPS(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with ST_SYMDIFFERENCE()
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CONTAINS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_EQUALS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_EQUALS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_DISJOINT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_DISJOINT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_INTERSECTS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_INTERSECTS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
SELECT ST_CROSSES(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CROSSES(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_TOUCHES(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_TOUCHES(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_WITHIN(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_WITHIN(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_OVERLAPS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_OVERLAPS(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with ST_INTERSECTION()
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CONTAINS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_EQUALS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_EQUALS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_DISJOINT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_DISJOINT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_INTERSECTS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_INTERSECTS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
SELECT ST_CROSSES(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_CROSSES(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_TOUCHES(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_TOUCHES(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
SELECT ST_WITHIN(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_WITHIN(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
1
SELECT ST_OVERLAPS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)));
ST_OVERLAPS(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2)))
0
#-------------------------------------------------------------------------------------------
# Spatial Operators with ST_UNION()
#-------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_UNION(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
POLYGON((20 15,15 25,10 15,0 15,7 10,5 0,15 5,15.909090909090908 4.545454545454546,15 0,20 2.5,25 0,23.695652173913043 4.3478260869565215,25 5,35 0,32 10,40 15,30 15,25 25,20 15))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
MULTIPOLYGON(((20 15,15 25,19 15,20 15)),((15 25,10 15,11 15,15 25)),((5 0,8.870967741935484 9.67741935483871,0 15,7 10,5 0)))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_UNION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
POLYGON((20 15,19 15,15 25,11 15,10 15,0 15,8.870967741935484 9.67741935483871,5 0,15 5,15.909090909090908 4.545454545454546,15 0,20 2.5,25 0,23.695652173913043 4.3478260869565215,25 5,35 0,32 10,40 15,30 15,25 25,20 15))
#-------------------------------------------------------------------------------------------
# Spatial Operators with ST_DIFFERENCE()
#-------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
MULTIPOLYGON(((10 15,20 15,15 25,10 15)),((25 0,23.695652173913043 4.3478260869565215,23.333333333333336 4.166666666666667,23.33333412581676 4.166664685458106,20 2.5,25 0)),((10.777777639730637 14.44444409932659,10 15,0 15,7 10,5 0,15 5,15.90909090909091 4.545454545454546,17 10,10.777777639730637 14.44444409932659)))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
POLYGON((23.33333412581676 4.166664685458106,23.695652173913043 4.3478260869565215,23.333333333333336 4.166666666666667,23.33333412581676 4.166664685458106))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
MULTIPOLYGON(((23.33333412581676 4.166664685458106,23.695652173913043 4.3478260869565215,23.333333333333336 4.166666666666667,23.33333412581676 4.166664685458106)),((10 15,20 15,15 25,10 15)),((10.777777639730637 14.44444409932659,8.870967741935484 9.67741935483871,0 15,7 10,5 0,15 5,15.90909090909091 4.545454545454546,17 10,10.777777639730637 14.44444409932659)),((25 0,23.33333412581676 4.166664685458106,20 2.5,25 0)))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_DIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
MULTIPOLYGON(((25 0,23.695652173913043 4.3478260869565215,23.33333412581676 4.166664685458106,25 0)),((10.777777639730637 14.44444409932659,10 15,0 15,8.870967741935484 9.67741935483871,10.777777639730637 14.44444409932659)))
#-------------------------------------------------------------------------------------------
# Spatial Operators with ST_SYMDIFFERENCE()
#-------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
MULTIPOLYGON(((20 2.5,25 0,23.695652173913043 4.3478260869565215,23.333333333333336 4.166666666666667,19 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,15.90909090909091 4.545454545454546,16.071429972789407 5.357142459183436,20.454545435878362 2.727272963927534,20 2.5),(10 15,11 15,10.777778284173866 14.444445710434662,10 15)),((20 2.5,15.909090909090908 4.545454545454546,15 0,20 2.5)),((25 25,20 15,30 15,25 25)),((40 15,30 15,22 10,23.695652173913043 4.3478260869565215,25 5,35 0,32 10,40 15)))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
POLYGON((20.454545435878362 2.727272963927534,22.05644715646448 3.5282235782322404,23.333333333333332 4.166666666666667,19 15,11 15,10.777778284173866 14.444445710434662,17 10,16.071429972789407 5.357142459183436,20.454545435878362 2.727272963927534))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
MULTIPOLYGON(((20 15,15 25,19 15,20 15)),((10 15,11 15,15 25,10 15)),((8.870967741935484 9.67741935483871,0 15,7 10,5 0,8.870967741935484 9.67741935483871)),((10.777777750841748 14.44444437710437,10.777778284173866 14.444445710434662,10 15,10.777777750841748 14.44444437710437)),((16.071429972789407 5.357142459183436,20.454545435878362 2.727272963927534,25 0,23.333333398692986 4.166666503267538,19 15,11 15,10.777778284173866 14.444445710434662,17 10,10.777777750841748 14.444444377104368,8.870967741935484 9.67741935483871,16.071429972789407 5.357142459183436)))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
GEOMETRYCOLLECTION(MULTIPOINT((16.071429972789407 5.357142459183436),(20.454545435878362 2.727272963927534),(22.05644715646448 3.5282235782322404)),MULTILINESTRING((-1.7763568394002505e-15 15,0 15),(15 5,15.90909090909091 4.545454545454546)),MULTIPOLYGON(((20 2.5,25 0,20.454545659504127 2.727272829752063,20 2.5)),((20 2.5,15.909090909090908 4.545454545454546,15 0,20 2.5)),((25 25,20 15,30 15,25 25)),((11 15,19 15,15 25,11 15)),((23.333333398692986 4.166666503267538,25 0,23.695652173913043 4.3478260869565215,23.333333398692986 4.166666503267538)),((0 15,8.870967741935484 9.67741935483871,10.777777750841748 14.44444437710437,10 15,0 15)),((15.90909090909091 4.545454545454546,16.071428650510203 5.357143252551023,8.870967741935484 9.67741935483871,5 0,15 5,15.90909090909091 4.545454545454546)),((17 10,10.777778284173866 14.444445710434662,10.777777750841748 14.444444377104368,17 10)),((40 15,30 15,22 10,23.695652173913043 4.3478260869565215,25 5,35 0,32 10,40 15))))
#-------------------------------------------------------------------------------------------
# Spatial Operators with ST_INTERSECTION()
#-------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
POLYGON((11 15,10 15,10.777777868529943 14.444444671324861,17 10,15.909090909090908 4.545454545454546,20 2.5,20.454544545454624 2.727273272727224,20.454545454545453 2.727272727272727,23.333333333333332 4.166666666666667,23.333333000000025 4.166667499999937,23.695652173913043 4.3478260869565215,22 10,30 15,20 15,19 15,11 15))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
POLYGON((23.333333000000025 4.166667499999937,20.454544545454624 2.727273272727224,20.454545454545453 2.727272727272727,23.333333333333332 4.166666666666667,23.333333000000025 4.166667499999937))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
MULTIPOLYGON(((23.333333000000025 4.166667499999937,20.454544545454624 2.727273272727224,20.454545454545453 2.727272727272727,23.333333333333332 4.166666666666667,23.333333000000025 4.166667499999937)),((19 15,23.333333000000025 4.166667499999936,23.695652173913043 4.3478260869565215,22 10,30 15,20 15,19 15)),((11 15,10 15,10.777777868529943 14.444444671324861,11 15)),((20.454544545454624 2.727273272727224,16.071428571428573 5.357142857142857,17 10,15.909090909090908 4.545454545454546,20 2.5,20.454544545454624 2.727273272727224)))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))));
ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star_elem_horizontal),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_GEOMFROMTEXT(@star_2)),ST_INTERSECTION(ST_GEOMFROMTEXT(@star_1),ST_GEOMFROMTEXT(@star_2))))
POLYGON((11 15,10.777777868529943 14.444444671324861,17 10,16.071428571428573 5.357142857142857,20.454544545454624 2.727273272727224,23.333333000000025 4.166667499999937,19 15,11 15))
#=======================================================================================
# Testing with combinations of 3 functions
#=======================================================================================
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
MULTIPOLYGON(((15 25,25 0,22 10,30 15,20 15,15 25)),((15 25,10 15,0 15,7 10,5 0,15 25)))
SELECT ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
POLYGON((15 25,10 15,0 15,7 10,5 0,15 5,25 0,22 10,30 15,20 15,15 25))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
POLYGON((15 25,5 0,15 5,25 0,15 25))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
MULTIPOLYGON(((15 25,25 0,22 10,30 15,20 15,15 25)),((15 25,10 15,0 15,7 10,5 0,15 25)))
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_UNION() and ST_DIFFERENCE
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_UNION() and ST_SYMDIFFERENCE
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_UNION() and ST_INTERSECTION
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_DIFFERENCE() and ST_UNION
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_EQUALS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_DIFFERENCE() and ST_SYMDIFFERENCE
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_EQUALS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_DISJOINT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_DIFFERENCE() and ST_INTERSECTION
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_EQUALS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_WITHIN(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_SYMDIFFERENCE() and ST_UNION
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_EQUALS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_SYMDIFFERENCE() and ST_DIFFERENCE
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_EQUALS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_DISJOINT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
#----------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_SYMDIFFERENCE() and ST_INTERSECTION
#----------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_EQUALS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_WITHIN(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_INTERSECTION() and ST_UNION
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
#-------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_INTERSECTION() and ST_DIFFERENCE
#-------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
#---------------------------------------------------------------------------------------------
# Spatial Testing functions with combination of ST_INTERSECTION() and ST_SYMDIFFERENCE
#---------------------------------------------------------------------------------------------
SELECT ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
SELECT ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
1
SELECT ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)));
ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)))
0
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_UNION() and ST_DIFFERENCE
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0,22 10,30 15,20 15))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_UNION() and ST_SYMDIFFERENCE
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0,22 10,30 15,20 15))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_UNION() and ST_INTERSECTION
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((25 0,22 10,30 15,20 15,15 25,25 0)),((5 0,15 25,10 15,0 15,7 10,5 0)))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((25 0,22 10,30 15,20 15,15 25,25 0)),((5 0,15 25,10 15,0 15,7 10,5 0)))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_DIFFERENCE() and ST_UNION
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0,22 10,30 15,20 15))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_DIFFERENCE() and ST_SYMDIFFERENCE
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_DIFFERENCE() and ST_INTERSECTION
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((5 0,15 25,10 15,0 15,7 10,5 0)),((25 0,22 10,30 15,20 15,15 25,25 0)))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((15 25,10 15,0 15,7 10,5 0,15 5,25 0,22 10,30 15,20 15,15 25))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTILINESTRING((15 25,5 0),(25 0,15 25))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_SYMDIFFERENCE() and ST_UNION
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0,22 10,30 15,20 15))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_SYMDIFFERENCE() and ST_DIFFERENCE
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((20 15,15 25,25 0,22 10,30 15,20 15)),((5 0,15 25,10 15,0 15,7 10,5 0)))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_SYMDIFFERENCE() and ST_INTERSECTION
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((5 0,15 25,10 15,0 15,7 10,5 0)),((25 0,22 10,30 15,20 15,15 25,25 0)))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((15 25,10 15,0 15,7 10,5 0,15 5,25 0,22 10,30 15,20 15,15 25))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTILINESTRING((15 25,5 0),(25 0,15 25))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_INTERSECTION() and ST_UNION
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTIPOLYGON(((25 0,22 10,30 15,20 15,15 25,25 0)),((5 0,15 25,10 15,0 15,7 10,5 0)))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_UNION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_INTERSECTION() and ST_DIFFERENCE
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((5 0,15 5,25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_DIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTILINESTRING((15 25,5 0),(25 0,15 25))
#---------------------------------------------------------------------------------------------
# Spatial Operators with combination of ST_INTERSECTION() and ST_SYMDIFFERENCE
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((25 0,15 25,5 0,15 5,25 0))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
POLYGON((5 0,15 5,25 0,22 10,30 15,20 15,15 25,10 15,0 15,7 10,5 0))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))));
ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)),
ST_SYMDIFFERENCE(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical))))
MULTILINESTRING((15 25,5 0),(25 0,15 25))
#=======================================================================================
# Spatial set operations involving empty geometry collections.
#=======================================================================================
#---------------------------------------------------------------------------------------------
# Empty collection and empty collection
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
GEOMETRYCOLLECTION()
#---------------------------------------------------------------------------------------------
# Empty collection and non-empty collection
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_UNION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
POINT(0 0)
SELECT ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_INTERSECTION(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_DIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_DIFFERENCE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
POINT(0 0)
#---------------------------------------------------------------------------------------------
# Non-empty collection and empty collection
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_UNION(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
MULTIPOINT((2 2),(3 3))
SELECT ST_ASTEXT(ST_INTERSECTION(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_INTERSECTION(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
MULTIPOINT((2 2),(3 3))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))));
ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)'))))
MULTIPOINT((2 2),(3 3))
#---------------------------------------------------------------------------------------------
# Empty intermediate or final result
#---------------------------------------------------------------------------------------------
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0, 4 4)')));
ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0, 4 4)')))
MULTIPOINT((2 2),(3 3))
SELECT ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')));
ST_ASTEXT(ST_DIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')))
GEOMETRYCOLLECTION()
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0, 4 4)')));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0, 4 4)')))
MULTIPOINT((0 0),(2 2),(3 3),(4 4))
SELECT ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')));
ST_ASTEXT(ST_SYMDIFFERENCE(ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')))
GEOMETRYCOLLECTION()
#=======================================================================================
# Spatial relation check operations involving empty geometry collections.
#=======================================================================================
#---------------------------------------------------------------------------------------------
# Empty collection and empty collection
#---------------------------------------------------------------------------------------------
SELECT ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
1
SELECT ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
1
SELECT ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
#---------------------------------------------------------------------------------------------
# Empty collection and non-empty collection
#---------------------------------------------------------------------------------------------
SELECT ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_INTERSECTS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_DISJOINT(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
1
SELECT ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_EQUALS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_CONTAINS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_WITHIN(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_TOUCHES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_OVERLAPS(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_CROSSES(ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_UNION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
#---------------------------------------------------------------------------------------------
# Non-empty collection and empty collection
#---------------------------------------------------------------------------------------------
SELECT ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_INTERSECTS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_DISJOINT(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
1
SELECT ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_EQUALS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_CONTAINS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_WITHIN(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_TOUCHES(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_OVERLAPS(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
SELECT ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_CROSSES(ST_UNION(ST_GEOMFROMTEXT('POINT(1 1)'),ST_GEOMFROMTEXT('MULTIPOINT(2 2, 3 3)')),
ST_INTERSECTION(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
0
#clean up
DROP TABLE gis_geometrycollection;
DROP TABLE gis_geometrycollection_2;

Man Man