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 |
Current File : /home/usr.opt/mysql57/mysql-test/suite/gis/r/spatial_testing_functions_touches.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_collection_elems='GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),LINESTRING(15 25,15 10),MULTIPOINT(5 0,25 0),POINT(15 25))'; SET @star_collection_multilinestr='GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),MULTILINESTRING((25 0,0 15,15 30,0 5)),LINESTRING(15 25,15 10),MULTIPOINT(5 0,25 0),POINT(15 25))'; 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_collection_elems_1='GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),LINESTRING(15 25,15 10),MULTIPOINT(5 0,25 0),POINT(15 25))'; 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_collection_elems_2='GEOMETRYCOLLECTION(MULTIPOLYGON(((15 0,25 25,35 0,25 5,15 0)),((35 0,10 15,40 15,32 10,35 0))),POLYGON((15 0,17 10,10 15,20 15,25 25,30 15,40 15,32 10,35 0,25 5,15 0)),LINESTRING(25 25,25 10),MULTIPOINT(15 0,35 0),POINT(25 25))'; 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)))'; SET @star_collection_elems_3='GEOMETRYCOLLECTION(MULTIPOLYGON(((65 0,75 25,85 0,75 5,65 0)),((85 0,60 15,90 15,82 10,85 0))),POLYGON((65 0,67 10,60 15,70 15,75 25,80 15,90 15,82 10,85 0,75 5,65 0)),LINESTRING(75 25,75 10),MULTIPOINT(65 0,85 0),POINT(75 25))'; #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)), (115,ST_GEOMFROMTEXT(@star_collection_elems)); #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)), (215,ST_GEOMFROMTEXT(@star_collection_elems_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)), (315,ST_GEOMFROMTEXT(@star_collection_elems_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)), (415,ST_GEOMFROMTEXT(@star_collection_elems_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 #64 rows. SELECT count(ST_ASTEXT(g) != 'NULL') FROM gis_geometrycollection; count(ST_ASTEXT(g) != 'NULL') 64 #64 rows. SELECT count(ST_ASTEXT(g2) != 'NULL') FROM gis_geometrycollection_2; count(ST_ASTEXT(g2) != 'NULL') 64 ##################################################################################### # MBRTOUCHES(g1,g2) ##################################################################################### #==================================================================================== # point,point #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star_center)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=105; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(0 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(0 0)')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(10 0)')) 0 #==================================================================================== # point,multipoint #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_bottom_left),ST_GEOMFROMTEXT(@star_bottom_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_bottom_left),ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_bottom_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=106; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0)')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0)')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')) 0 #==================================================================================== # point,linestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_top_to_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_top_to_center)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_line_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_line_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=104; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0,20 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0,20 0)')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')) 0 #==================================================================================== # point,multilinestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=104; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 0))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 0))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0,10 0))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0,10 0))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')) 0 #==================================================================================== # point,polygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_vertical)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star)) FROM gis_geometrycollection WHERE fid=104; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')) 0 #==================================================================================== # point,multipolygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_of_elems)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=104; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((10 10,10 20,20 20,20 10,10 10)))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((10 10,10 20,20 20,20 10,10 10)))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')) 0 #==================================================================================== # point,geometrycollection #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_elems)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=104; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_multilinestr)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())')) NULL SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(0 0,5 5,10 10),GEOMETRYCOLLECTION())')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(0 0,5 5,10 10),GEOMETRYCOLLECTION())')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')); MBRTOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')) 0 #==================================================================================== # multipoint,point #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_left)) FROM gis_geometrycollection WHERE fid=108; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_left)) 1 #==================================================================================== # multipoint,multipoint #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_bottom_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_all_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_all_points)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=208; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=308; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 1 #==================================================================================== # multipoint,linestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top_to_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=109; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=209; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=309; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 1 #==================================================================================== # multipoint,multilinestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) FROM gis_geometrycollection WHERE fid=109; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 #==================================================================================== # multipoint,polygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) FROM gis_geometrycollection WHERE fid=109; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) FROM gis_geometrycollection WHERE fid=209; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) FROM gis_geometrycollection WHERE fid=309; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 #==================================================================================== # multipoint,multipolygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=109; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=209; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=309; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 #==================================================================================== # multipoint,geometrycollection #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=109; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=209; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=309; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_multilinestr)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # linestring,point #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_center)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_bottom_left)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_bottom_left)) 0 SELECT MBRTOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=110 and fid2=105; MBRTOUCHES(g,g2) 0 #==================================================================================== # linestring,multipoint #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_all_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) FROM gis_geometrycollection WHERE fid=111; MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) FROM gis_geometrycollection WHERE fid=311; MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) FROM gis_geometrycollection WHERE fid=411; MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 #==================================================================================== # linestring,linestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_top_to_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_line_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=111; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=311; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=411; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 #==================================================================================== # linestring,multilinestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) FROM gis_geometrycollection WHERE fid=110; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 #==================================================================================== # linestring,polygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT('POLYGON((11 15,19 15,19 10,11 15))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT('POLYGON((11 15,19 15,19 10,11 15))')) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_2)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_2)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_3)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_3)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('POLYGON((11 15,19 15,11 15))')) FROM gis_geometrycollection WHERE fid=110; ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. #==================================================================================== # linestring,multipolygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT('MULTIPOLYGON(((11 15,19 15,11 15)),((25 0,0 15,25 0)))')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_2)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_2)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_3)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_3)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOLYGON(((11 15,19 15,11 15)),((25 0,0 15,25 0)))')) FROM gis_geometrycollection WHERE fid=110; ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. #==================================================================================== # linestring,geometrycollection #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),' 'POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),' 'LINESTRING(15 25,15 10),' 'MULTIPOINT(5 0,25 0),' 'POINT(15 25))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),' 'POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,3 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_2)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_2)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_3)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_3)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),' 'POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),' 'LINESTRING(15 25,15 10),' 'MULTIPOINT(5 0,25 0),' 'POINT(15 25))')) FROM gis_geometrycollection WHERE fid=110; MBRTOUCHES(g,ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOLYGON(((5 0,15 25,25 0,15 5,5 0)),((25 0,0 15,30 15,22 10,25 0))),' 'POLYGON((5 0,7 10,0 15,10 15,15 25,20 15,30 15,22 10,25 0,15 5,5 0)),' 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_multilinestr)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # multilinestring,point #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_top)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_top)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_2)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_2)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_3)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_3)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=114; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 1 #==================================================================================== # multilinestring,multipoint #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_bottom_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_all_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=114; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT MBRTOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=114 and fid2=108; MBRTOUCHES(g,g2) 0 #==================================================================================== # multilinestring,linestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_vertical)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_2)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_2)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_3)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_3)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=114; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 1 #==================================================================================== # multilinestring,multilinestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal_3)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal_3)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')) FROM gis_geometrycollection WHERE fid=114; MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')) 0 #==================================================================================== # multilinestring,polygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_2)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_2)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_3)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_3)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=114; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 #==================================================================================== # multilinestring,multipolygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_elem_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=114; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 #==================================================================================== # multilinestring,geometrycollection #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=114; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_multilinestr)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # polygon,point #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_bottom_left)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_bottom_left)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('POINT(0 0)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('POINT(0 0)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=100; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=200; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=300; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=400; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 #==================================================================================== # polygon,multipoint #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_all_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('MULTIPOINT(0 0,30 25)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('MULTIPOINT(0 0,30 25)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=100; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=300; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=400; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 #==================================================================================== # polygon,linestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_line_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=100; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=300; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=400; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT MBRTOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=100 and fid2=111; MBRTOUCHES(g,g2) 0 #==================================================================================== # polygon,multilinestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_lines_near_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=100; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=300; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=400; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 #==================================================================================== # polygon,polygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) FROM gis_geometrycollection WHERE fid=100; MBRTOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 15,25 20,30 15,25 15))')) FROM gis_geometrycollection WHERE fid=100; MBRTOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 15,25 20,30 15,25 15))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=400; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 #==================================================================================== # polygon,multipolygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_of_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) FROM gis_geometrycollection WHERE fid=100; MBRTOUCHES(g,ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=300; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=400; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 #==================================================================================== # polygon,geometrycollection #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_collection_elems)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=300; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=400; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_multilinestr)); MBRTOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # multipolygon,point #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POINT(30 30)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POINT(30 30)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=103; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=403; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 0 #==================================================================================== # multipolygon,multipoint #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_bottom_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=103; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=403; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 0 #==================================================================================== # multipolygon,linestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top_to_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=103; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=403; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 #==================================================================================== # multipolygon,multilinestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=103; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=403; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 #==================================================================================== # multipolygon,polygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_elem_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=103; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=303; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=403; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 #==================================================================================== # multipolygon,multipolygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=103; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=303; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=403; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT MBRTOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; MBRTOUCHES(g,g2) 0 #==================================================================================== # multipolygon,geometrycollection #==================================================================================== SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=103; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=303; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=403; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=115; MBRTOUCHES(g,g2) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # geometrycollection,point #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POINT(30 30)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POINT(30 30)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=115; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=415; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 0 #==================================================================================== # geometrycollection,multipoint #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_bottom_points)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=115; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=415; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(5 0,5 10),GEOMETRYCOLLECTION())'),ST_GEOMFROMTEXT('MULTIPOINT(5 0,5 10)')); MBRTOUCHES(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(5 0,5 10),GEOMETRYCOLLECTION())'),ST_GEOMFROMTEXT('MULTIPOINT(5 0,5 10)')) 0 #==================================================================================== # geometrycollection,linestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top_to_center)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=115; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=415; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(5 0,5 10),GEOMETRYCOLLECTION())'),ST_GEOMFROMTEXT('LINESTRING(5 0,5 10)')); MBRTOUCHES(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(LINESTRING(5 0,5 10),GEOMETRYCOLLECTION())'),ST_GEOMFROMTEXT('LINESTRING(5 0,5 10)')) 0 #==================================================================================== # geometrycollection,multilinestring #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=115; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=415; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 #==================================================================================== # geometrycollection,polygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_elem_vertical)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=115; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=315; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=415; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 #==================================================================================== # geometrycollection,multipolygon #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=115; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=315; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=415; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=115 and fid2=115; MBRTOUCHES(g,g2) 0 #==================================================================================== # geometrycollection,geometrycollection #==================================================================================== SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=115; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=315; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=415; MBRTOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT MBRTOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=115 and fid2=115; MBRTOUCHES(g,g2) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 ##################################################################################### # ST_TOUCHES(g1,g2) ##################################################################################### #==================================================================================== # point,point #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star_center)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=105; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(0 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(0 0)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POINT(10 0)')) 0 #==================================================================================== # point,multipoint #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_bottom_left),ST_GEOMFROMTEXT(@star_bottom_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_bottom_left),ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_bottom_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=106; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,10 0)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTIPOINT(0 0,5 0,10 0)')) 0 #==================================================================================== # point,linestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_top_to_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_top_to_center)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_line_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_line_horizontal)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=104; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0,20 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0,20 0)')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 0)')) 0 #==================================================================================== # point,multilinestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=104; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 0))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,10 0))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(10 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0,10 0))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0,10 0))')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 0)'),ST_GEOMFROMTEXT('MULTILINESTRING((0 0,5 0),(5 0,10 0))')) 0 #==================================================================================== # point,polygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_center),ST_GEOMFROMTEXT(@star)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_elem_vertical)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star)) FROM gis_geometrycollection WHERE fid=104; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 0)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4))')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('POLYGON((0 0,10 0,10 10,0 10,0 0))')) 0 #==================================================================================== # point,multipolygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_of_elems)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=104; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((10 10,10 20,20 20,20 10,10 10)))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((10 10,10 20,20 20,20 10,10 10)))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0),(4 4,4 6,6 6,6 4,4 4)))')) 0 #==================================================================================== # point,geometrycollection #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_elems)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(-0.01 0)'),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=104; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_multilinestr)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION())')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(5 5))')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(0 0,5 5,10 10),GEOMETRYCOLLECTION())')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(5 5)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(MULTIPOINT(0 0,5 5,10 10),GEOMETRYCOLLECTION())')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(0 0)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')); ST_TOUCHES(ST_GEOMFROMTEXT('POINT(20 20)'),ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POLYGON((0 0,10 0,10 10,0 10,0 0))))')) 0 #==================================================================================== # multipoint,point #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_left)) FROM gis_geometrycollection WHERE fid=108; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_left)) 0 #==================================================================================== # multipoint,multipoint #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_bottom_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_all_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_bottom_points),ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=208; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=308; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 #==================================================================================== # multipoint,linestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top_to_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_top_to_center)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=109; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=209; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=309; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 #==================================================================================== # multipoint,multilinestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) FROM gis_geometrycollection WHERE fid=109; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 1 #==================================================================================== # multipoint,polygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) FROM gis_geometrycollection WHERE fid=109; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) FROM gis_geometrycollection WHERE fid=209; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) FROM gis_geometrycollection WHERE fid=309; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 #==================================================================================== # multipoint,multipolygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=109; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=209; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=309; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 #==================================================================================== # multipoint,geometrycollection #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOINT(0 0,0 30,30 25)'),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=109; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=209; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=309; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_multilinestr)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_all_points),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # linestring,point #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_center)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_bottom_left)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_bottom_left)) 0 SELECT ST_TOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=110 and fid2=105; ST_TOUCHES(g,g2) 0 #==================================================================================== # linestring,multipoint #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_all_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) FROM gis_geometrycollection WHERE fid=111; ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) FROM gis_geometrycollection WHERE fid=311; ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) FROM gis_geometrycollection WHERE fid=411; ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOINT(15 10,15 25)')) 0 #==================================================================================== # linestring,linestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_top_to_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_vertical),ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_line_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top_to_center),ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=111; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=311; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=411; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 #==================================================================================== # linestring,multilinestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) FROM gis_geometrycollection WHERE fid=110; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 #==================================================================================== # linestring,polygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT('POLYGON((11 15,19 15,19 10,11 15))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT('POLYGON((11 15,19 15,19 10,11 15))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_2)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_2)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_3)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_elem_horizontal_3)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('POLYGON((11 15,19 15,19 25,11 15,11 15))')) FROM gis_geometrycollection WHERE fid=110; ST_TOUCHES(g,ST_GEOMFROMTEXT('POLYGON((11 15,19 15,19 25,11 15,11 15))')) 1 #==================================================================================== # linestring,multipolygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT('MULTIPOLYGON(((11 15,19 15,19 25,11 15,11 15)),((25 0,0 15,25 10,25 0)))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT('MULTIPOLYGON(((11 15,19 15,19 25,11 15,11 15)),((25 0,0 15,25 10,25 0)))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_2)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_2)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_3)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_of_elems_3)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOLYGON(((11 15,19 15,19 25,11 15,11 15)),((25 0,0 15,25 10,25 0)))')) FROM gis_geometrycollection WHERE fid=110; ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOLYGON(((11 15,19 15,19 25,11 15,11 15)),((25 0,0 15,25 10,25 0)))')) 1 #==================================================================================== # linestring,geometrycollection #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_2)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_2)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_3)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_elems_3)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=110; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_multilinestr)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_line_horizontal),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # multilinestring,point #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_top)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_top)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_2)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_2)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_3)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_center_3)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=114; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 0 #==================================================================================== # multilinestring,multipoint #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_bottom_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_all_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=114; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 0 SELECT ST_TOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=114 and fid2=108; ST_TOUCHES(g,g2) 0 #==================================================================================== # multilinestring,linestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_vertical)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_2)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_2)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_3)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_line_horizontal_3)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=114; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 1 #==================================================================================== # multilinestring,multilinestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal_3)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal_3)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')) FROM gis_geometrycollection WHERE fid=114; ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTILINESTRING((0 5,15 25,0 15))')) 0 #==================================================================================== # multilinestring,polygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_vertical)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_2)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_2)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_3)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_elem_horizontal_3)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=114; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 1 #==================================================================================== # multilinestring,multipolygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_elem_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=114; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 #==================================================================================== # multilinestring,geometrycollection #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT('MULTILINESTRING((0 25,25 0,25 30))'),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=114; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_multilinestr)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_lines_near_vertical),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # polygon,point #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_bottom_left)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_bottom_left)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('POINT(0 0)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('POINT(0 0)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=100; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=200; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=300; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) FROM gis_geometrycollection WHERE fid=400; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_center)) 0 #==================================================================================== # polygon,multipoint #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_all_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('MULTIPOINT(0 0,30 25)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT('MULTIPOINT(0 0,30 25)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=100; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=300; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) FROM gis_geometrycollection WHERE fid=400; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_all_points)) 0 #==================================================================================== # polygon,linestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_line_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_line_horizontal)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=100; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=300; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) FROM gis_geometrycollection WHERE fid=400; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_line_vertical)) 0 SELECT ST_TOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=100 and fid2=111; ST_TOUCHES(g,g2) 0 #==================================================================================== # polygon,multilinestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_lines_near_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_lines_near_horizontal)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=100; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=300; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=400; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 #==================================================================================== # polygon,polygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) FROM gis_geometrycollection WHERE fid=100; ST_TOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 15,25 20,30 15,25 15))')) FROM gis_geometrycollection WHERE fid=100; ST_TOUCHES(g,ST_GEOMFROMTEXT('POLYGON((25 15,25 20,30 15,25 15))')) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=400; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 #==================================================================================== # polygon,multipolygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_of_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) FROM gis_geometrycollection WHERE fid=100; ST_TOUCHES(g,ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=300; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=400; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 #==================================================================================== # polygon,geometrycollection #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_collection_elems)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_elem_vertical),ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=300; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=400; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_multilinestr)); ST_TOUCHES(ST_GEOMFROMTEXT(@star),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # multipolygon,point #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POINT(30 30)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POINT(30 30)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=103; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=403; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 0 #==================================================================================== # multipolygon,multipoint #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_bottom_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=103; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=403; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 0 #==================================================================================== # multipolygon,linestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top_to_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=103; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=403; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))'), ST_GEOMFROMTEXT('LINESTRING(5 5,0 0,10 0)')); ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))'), ST_GEOMFROMTEXT('LINESTRING(5 5,0 0,10 0)')) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))'), ST_GEOMFROMTEXT('LINESTRING(5 5,0 0,0 10)')); ST_TOUCHES(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0,0 0)),((0 0,0 -10,-10 -10,-10 0,0 0)))'), ST_GEOMFROMTEXT('LINESTRING(5 5,0 0,0 10)')) 0 #==================================================================================== # multipolygon,multilinestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=103; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=403; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 #==================================================================================== # multipolygon,polygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_elem_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=103; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=303; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=403; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 #==================================================================================== # multipolygon,multipolygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=103; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=303; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) FROM gis_geometrycollection WHERE fid=403; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_of_elems)) 0 SELECT ST_TOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; ST_TOUCHES(g,g2) 0 #==================================================================================== # multipolygon,geometrycollection #==================================================================================== SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=103; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=303; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=403; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=115; ST_TOUCHES(g,g2) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 #==================================================================================== # geometrycollection,point #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POINT(30 30)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POINT(30 30)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=115; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection WHERE fid=415; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top)) 0 #==================================================================================== # geometrycollection,multipoint #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_bottom_points)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOINT(30 30,0 35)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=115; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 1 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) FROM gis_geometrycollection WHERE fid=415; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_bottom_points)) 0 #==================================================================================== # geometrycollection,linestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top_to_center)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('LINESTRING(30 30,0 35)')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=115; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) FROM gis_geometrycollection WHERE fid=415; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_top_to_center)) 0 #==================================================================================== # geometrycollection,multilinestring #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTILINESTRING((0 30,30 30,0 35))')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=115; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) FROM gis_geometrycollection WHERE fid=415; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_lines_near_vertical)) 0 #==================================================================================== # geometrycollection,polygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_elem_vertical)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((25 0,25 5,30 0,25 0))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('POLYGON((0 0,15 25,35 0,0 0,0 0))')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=115; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=315; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) FROM gis_geometrycollection WHERE fid=415; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_elem_vertical)) 0 #==================================================================================== # geometrycollection,multipolygon #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((25 0,25 5,30 0,25 0)),((25 15,25 20,30 15,25 15)))')) 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0,15 25,35 0,0 0,0 0),(5 0,15 25,25 0,15 5,5 0)))')) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=115; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=315; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=415; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=115 and fid2=115; ST_TOUCHES(g,g2) 0 #==================================================================================== # geometrycollection,geometrycollection #==================================================================================== SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=115; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=315; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) FROM gis_geometrycollection WHERE fid=415; ST_TOUCHES(g,ST_GEOMFROMTEXT(@star_collection_elems)) 0 SELECT ST_TOUCHES(g,g2) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=115 and fid2=115; ST_TOUCHES(g,g2) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_collection_elems),ST_GEOMFROMTEXT(@star_collection_multilinestr)) 0 ##################################################################################### # Testing with 2 geometries of same SRID ##################################################################################### #==================================================================================== # MBRTOUCHES(g1,g2) #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,0),ST_GEOMFROMTEXT(@star_center,0)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,0),ST_GEOMFROMTEXT(@star_center,0)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,100),ST_GEOMFROMTEXT(@star_center,100)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,100),ST_GEOMFROMTEXT(@star_center,100)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,20000),ST_GEOMFROMTEXT(@star_center,20000)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,20000),ST_GEOMFROMTEXT(@star_center,20000)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,123456),ST_GEOMFROMTEXT(@star_center,123456)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,123456),ST_GEOMFROMTEXT(@star_center,123456)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,1048575),ST_GEOMFROMTEXT(@star_center,1048575)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,1048575),ST_GEOMFROMTEXT(@star_center,1048575)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295),ST_GEOMFROMTEXT(@star_center,4294967295)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295),ST_GEOMFROMTEXT(@star_center,4294967295)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)) 0 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295000),ST_GEOMFROMTEXT(@star_center,4294967295000)); MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295000),ST_GEOMFROMTEXT(@star_center,4294967295000)) 0 #==================================================================================== # ST_TOUCHES(g1,g2) #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,0),ST_GEOMFROMTEXT(@star_center,0)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,0),ST_GEOMFROMTEXT(@star_center,0)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,100),ST_GEOMFROMTEXT(@star_center,100)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,100),ST_GEOMFROMTEXT(@star_center,100)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,20000),ST_GEOMFROMTEXT(@star_center,20000)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,20000),ST_GEOMFROMTEXT(@star_center,20000)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,123456),ST_GEOMFROMTEXT(@star_center,123456)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,123456),ST_GEOMFROMTEXT(@star_center,123456)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,1048575),ST_GEOMFROMTEXT(@star_center,1048575)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,1048575),ST_GEOMFROMTEXT(@star_center,1048575)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295),ST_GEOMFROMTEXT(@star_center,4294967295)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295),ST_GEOMFROMTEXT(@star_center,4294967295)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,-1024),ST_GEOMFROMTEXT(@star_center,-1024)) 0 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295000),ST_GEOMFROMTEXT(@star_center,4294967295000)); ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,4294967295000),ST_GEOMFROMTEXT(@star_center,4294967295000)) 0 ##################################################################################### # Invalid function calls ##################################################################################### #==================================================================================== # ST_TOUCHES(g1,g2) #==================================================================================== SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_center,4326)); ERROR HY000: Binary geometry function st_touches given two geometries of different srids: 0 and 4326, which should have been identical. SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_top,1048576),ST_GEOMFROMTEXT(@star_center,4326)); ERROR HY000: Binary geometry function st_touches given two geometries of different srids: 1048576 and 4326, which should have been identical. SELECT ST_TOUCHES(NULL,ST_GEOMFROMTEXT(@star_top)); ST_TOUCHES(NULL,ST_GEOMFROMTEXT(@star_top)) NULL SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),NULL); ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),NULL) NULL SELECT ST_TOUCHES(g,NULL) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; ST_TOUCHES(g,NULL) NULL SELECT ST_TOUCHES(NULL,NULL); ST_TOUCHES(NULL,NULL) NULL SELECT ST_TOUCHES(fid,NULL) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; ST_TOUCHES(fid,NULL) NULL SELECT ST_TOUCHES(fid,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; ERROR 22023: Invalid GIS data provided to function st_touches. SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),fid) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; ERROR 22023: Invalid GIS data provided to function st_touches. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(a 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(! 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT('!' 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'))' at line 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POINT(12,34 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('LINESTRING(a 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('LINESTRING(0 0,! 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('LINESTRING('!' 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'))' at line 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('LINESTRING(12,34 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POLYGON((a 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POLYGON((0 0,! 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POLYGON(('!' 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'))' at line 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POLYGON((12,34 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(ST_GEOMFROMTEXT('POLYGON((12,34 0,10 10,10 0,0 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT ST_TOUCHES(,); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 SELECT ST_TOUCHES(ST_GEOMFROMTEXT(@star_of_elems),); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 SELECT ST_TOUCHES(,ST_GEOMFROMTEXT(@star_top)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ST_GEOMFROMTEXT(@star_top))' at line 1 #==================================================================================== # MBRTOUCHES(g1,g2) #==================================================================================== SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top),ST_GEOMFROMTEXT(@star_center,4326)); ERROR HY000: Binary geometry function mbrtouches given two geometries of different srids: 0 and 4326, which should have been identical. SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_top,1048576),ST_GEOMFROMTEXT(@star_center,4326)); ERROR HY000: Binary geometry function mbrtouches given two geometries of different srids: 1048576 and 4326, which should have been identical. SELECT MBRTOUCHES(NULL,ST_GEOMFROMTEXT(@star_top)); MBRTOUCHES(NULL,ST_GEOMFROMTEXT(@star_top)) NULL SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),NULL); MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),NULL) NULL SELECT MBRTOUCHES(g,NULL) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; MBRTOUCHES(g,NULL) NULL SELECT MBRTOUCHES(NULL,NULL); MBRTOUCHES(NULL,NULL) NULL SELECT MBRTOUCHES(fid,NULL) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; MBRTOUCHES(fid,NULL) NULL SELECT MBRTOUCHES(fid,ST_GEOMFROMTEXT(@star_top)) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; ERROR 22023: Invalid GIS data provided to function mbrtouches. SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),fid) FROM gis_geometrycollection,gis_geometrycollection_2 WHERE fid=103 and fid2=103; ERROR 22023: Invalid GIS data provided to function mbrtouches. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(a 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(! 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT('!' 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'))' at line 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POINT(12,34 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('LINESTRING(a 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('LINESTRING(0 0,! 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('LINESTRING('!' 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'))' at line 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('LINESTRING(12,34 0,10 10)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POLYGON((a 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POLYGON((0 0,! 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POLYGON(('!' 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '!' 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'))' at line 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POLYGON((12,34 0,10 10,10 0,0 0))'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(ST_GEOMFROMTEXT('POLYGON((12,34 0,10 10,10 0,0 0)'),ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')); ERROR 22023: Invalid GIS data provided to function st_geometryfromtext. SELECT MBRTOUCHES(,); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 SELECT MBRTOUCHES(ST_GEOMFROMTEXT(@star_of_elems),); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 SELECT MBRTOUCHES(,ST_GEOMFROMTEXT(@star_top)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ST_GEOMFROMTEXT(@star_top))' at line 1 CREATE TABLE t1 (g GEOMETRY NOT NULL); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('POINT(1 1)')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('LINESTRING(1 1, 2 2)')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('POLYGON((0 0, 1 0, 1 1, 0 1, 0 0))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0), (4 4, 6 4, 6 6, 4 6, 4 4))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('MULTIPOINT(1 1, 2 2)')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('MULTILINESTRING((1 1, 2 2),' '(3 3, 4 4))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)),((5 5, 10 5, 10 10, 5 10, 5 5)))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((5 5, 10 5, 10 10, 5 10, 5 5), ' '(6 6, 7 6, 7 7, 6 7, 6 6)))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((1 1, 10 1, 10 10, 1 10, 1 1), ' '(4 4, 6 4, 6 6, 4 6, 4 4)))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(1 1))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(LINESTRING(1 1, 2 2))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POLYGON((0 0, 1 0, 1' ' 1, 0 1, 0 0)))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(POLYGON((0 0, 10 0, 10 10, 0 10, 0 0), ' '(4 4, 6 4, 6 6, 4 6, 4 4)))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(MULTIPOINT(1 1, 2 2))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(MULTILINESTRING((1 1, 2 2), (3 3, 4 4)))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ' '((5 5, 10 5, 10 10, 5 10, 5 5))))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ' '((5 5, 10 5, 10 10, 5 10, 5 5), (6 6, 7 6, 7 7, 6 7, 6 6))))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ' '((1 1, 10 1, 10 10, 1 10, 1 1), (4 4, 6 4, 6 6, 4 6, 4 4))))')); INSERT INTO t1 VALUES (ST_GEOMFROMTEXT( 'GEOMETRYCOLLECTION(POINT(1 1),LINESTRING(1 1, 2 2),' 'POLYGON((0 0, 1 0, 1 1, 0 1, 0 0)),' 'POLYGON((0 0, 10 0, 10 10, 0 10, 0 0), (4 4, 6 4, 6 6, 4 6, 4 4)),' 'MULTIPOINT(1 1, 2 2),MULTILINESTRING((1 1, 2 2), (3 3, 4 4)),' 'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((5 5, 10 5, 10 10, 5 10, 5 5))),' 'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((5 5, 10 5, 10 10, 5 10, 5 5), ' '(6 6, 7 6, 7 7, 6 7, 6 6))))')); INSERT INTO t1 VALUES( GEOMETRYCOLLECTION(POINT(1,1),LINESTRING(POINT(1,1),POINT(2,2)), POLYGON(LINESTRING(POINT(0,0),POINT(1,0),POINT(1,1),POINT(0,1),POINT(0,0))), POLYGON(LINESTRING(POINT(0,0),POINT(10,0),POINT(10,10),POINT(0,10), POINT(0,0)),LINESTRING(POINT(4,4),POINT(6,4),POINT(6,6),POINT(4,6), POINT(4,4))),MULTIPOINT(POINT(1,1),POINT(2,2)), MultiLINESTRING(LINESTRING(POINT(1,1),POINT(2,2)),LINESTRING(POINT(3,3), POINT(4,4))),MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0),POINT(1,0),POINT(1,1), POINT(0,1),POINT(0,0))),POLYGON(LINESTRING(POINT(5,5),POINT(10,5), POINT(10,10),POINT(5,10),POINT(5,5)))), MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0),POINT(1,0),POINT(1,1),POINT(0,1), POINT(0,0))),POLYGON(LINESTRING(POINT(5,5),POINT(10,5),POINT(10,10), POINT(5,10),POINT(5,5)),LINESTRING(POINT(6,6),POINT(7,6),POINT(7,7), POINT(6,7),POINT(6,6)))),GEOMETRYCOLLECTION(POINT(1,1)), GEOMETRYCOLLECTION(LINESTRING(POINT(1,1),POINT(2,2))), GEOMETRYCOLLECTION(POLYGON(LINESTRING(POINT(0,0),POINT(1,0),POINT(1,1), POINT(0,1),POINT(0,0)))),GEOMETRYCOLLECTION(POLYGON(LINESTRING(POINT(0,0), POINT(10,0),POINT(10,10),POINT(0,10),POINT(0,0)),LINESTRING(POINT(4,4), POINT(6,4),POINT(6,6),POINT(4,6),POINT(4,4)))), GEOMETRYCOLLECTION(MULTIPOINT(POINT(1,1),POINT(2,2))), GEOMETRYCOLLECTION(MultiLINESTRING(LINESTRING(POINT(1,1),POINT(2,2)), LINESTRING(POINT(3,3),POINT(4,4)))), GEOMETRYCOLLECTION(MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0),POINT(1,0), POINT(1,1),POINT(0,1),POINT(0,0))),POLYGON(LINESTRING(POINT(5,5),POINT(10,5), POINT(10,10),POINT(5,10),POINT(5,5))))), GEOMETRYCOLLECTION(MULTIPOLYGON(POLYGON(LINESTRING(POINT(0,0),POINT(1,0), POINT(1,1),POINT(0,1),POINT(0,0))),POLYGON(LINESTRING(POINT(5,5),POINT(10,5), POINT(10,10),POINT(5,10),POINT(5,5)),LINESTRING(POINT(6,6),POINT(7,6), POINT(7,7),POINT(6,7),POINT(6,6))))))); INSERT INTO t1 VALUES ( GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(1,1)), GEOMETRYCOLLECTION(LINESTRING(POINT(1,1),POINT(2,2))), GEOMETRYCOLLECTION(POLYGON(LINESTRING(POINT(1,1), POINT(10,1), POINT(10,10), POINT(1,10), POINT(1,1)), LINESTRING(POINT(4,4),POINT(6,4),POINT(6,6), POINT(4,6),POINT(4,4)))))); SELECT ST_TOUCHES(a.g, b.g) FROM t1 AS a JOIN t1 AS b; ST_TOUCHES(a.g, b.g) 0 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 SELECT MBRTOUCHES(a.g, b.g) FROM t1 AS a JOIN t1 AS b; MBRTOUCHES(a.g, b.g) 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 # clean up DROP TABLE t1; DROP TABLE gis_geometrycollection; DROP TABLE gis_geometrycollection_2;