config root man

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

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/gis/r/spatial_utility_function_make_envelope.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_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))';
# 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)),
(116,ST_GEOMFROMTEXT(@star_collection_multilinestr));
# Checking the integrity of the above create/insert statements 
# 17 rows. 
SELECT count(ST_ASTEXT(g) != 'NULL') FROM gis_geometrycollection;
count(ST_ASTEXT(g) != 'NULL')
17
#####################################################################################
# ST_MAKEENVELOPE(point, point)
#####################################################################################
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1)')))
POLYGON((0 0,1 0,1 1,0 1,0 0))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 -1)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 -1)')))
POLYGON((0 -1,1 -1,1 0,0 0,0 -1))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(-1 1)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(-1 1)')))
POLYGON((-1 0,0 0,0 1,-1 1,-1 0))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(-1 -1)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(-1 -1)')))
POLYGON((-1 -1,0 -1,0 0,-1 0,-1 -1))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(0 0)')))
POLYGON((0 0,1 0,1 1,0 1,0 0))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 -1)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 -1)'), ST_GEOMFROMTEXT('POINT(0 0)')))
POLYGON((0 -1,1 -1,1 0,0 0,0 -1))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(-1 1)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(-1 1)'), ST_GEOMFROMTEXT('POINT(0 0)')))
POLYGON((-1 0,0 0,0 1,-1 1,-1 0))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(-1 -1)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(-1 -1)'), ST_GEOMFROMTEXT('POINT(0 0)')))
POLYGON((-1 -1,0 -1,0 0,-1 0,-1 -1))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 10)'), ST_GEOMFROMTEXT('POINT(10 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 10)'), ST_GEOMFROMTEXT('POINT(10 0)')))
POLYGON((0 0,10 0,10 10,0 10,0 0))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(10 0)'), ST_GEOMFROMTEXT('POINT(0 10)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(10 0)'), ST_GEOMFROMTEXT('POINT(0 10)')))
POLYGON((0 0,10 0,10 10,0 10,0 0))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(10 0)'), ST_GEOMFROMTEXT('POINT(10 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(10 0)'), ST_GEOMFROMTEXT('POINT(10 0)')))
POINT(10 0)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(100 -100)'), ST_GEOMFROMTEXT('POINT(100.00 -100.000)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(100 -100)'), ST_GEOMFROMTEXT('POINT(100.00 -100.000)')))
POINT(100 -100)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(0 0)')))
POINT(0 0)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(0 1)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(0 1)')))
LINESTRING(0 1,1 1)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 0)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 0)'), ST_GEOMFROMTEXT('POINT(0 0)')))
LINESTRING(0 0,1 0)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(-1 -1)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(-1 -1)')))
POLYGON((-1 -1,1 -1,1 1,-1 1,-1 -1))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0.0 -0.0)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0.0 -0.0)'), ST_GEOMFROMTEXT('POINT(0 0)')))
POINT(0 0)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(1 -100)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1 1)'), ST_GEOMFROMTEXT('POINT(1 -100)')))
LINESTRING(1 -100,1 1)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1e100 -1e100)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1e100 -1e100)'), ST_GEOMFROMTEXT('POINT(0 0)')))
POLYGON((0 -1e100,1e100 -1e100,1e100 0,0 0,0 -1e100))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1e100 -1e100)'), ST_GEOMFROMTEXT('POINT(1e100 -1e100)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1e100 -1e100)'), ST_GEOMFROMTEXT('POINT(1e100 -1e100)')))
POINT(1e100 -1e100)
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1e100 1e100)'), ST_GEOMFROMTEXT('POINT(-1e100 -1e100)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(1e100 1e100)'), ST_GEOMFROMTEXT('POINT(-1e100 -1e100)')))
POLYGON((-1e100 -1e100,1e100 -1e100,1e100 1e100,-1e100 1e100,-1e100 -1e100))
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(-1e100 -1e100)'), ST_GEOMFROMTEXT('POINT(1e100 -1e100)')));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(-1e100 -1e100)'), ST_GEOMFROMTEXT('POINT(1e100 -1e100)')))
LINESTRING(-1e100 -1e100,1e100 -1e100)
#####################################################################################
# Invalid function calls
#####################################################################################
SELECT ST_ASTEXT(ST_MAKEENVELOPE());
ERROR 42000: Incorrect parameter count in the call to native function 'ST_MAKEENVELOPE'
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(10 10)')));
ERROR 42000: Incorrect parameter count in the call to native function 'ST_MAKEENVELOPE'
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(10 10)'),NULL));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(10 10)'),NULL))
NULL
SELECT ST_ASTEXT(ST_MAKEENVELOPE(NULL,ST_GEOMFROMTEXT('POINT(10 10)')));
ST_ASTEXT(ST_MAKEENVELOPE(NULL,ST_GEOMFROMTEXT('POINT(10 10)')))
NULL
SELECT ST_ASTEXT(ST_MAKEENVELOPE(NULL,ST_GEOMFROMTEXT(@star_top)));
ST_ASTEXT(ST_MAKEENVELOPE(NULL,ST_GEOMFROMTEXT(@star_top)))
NULL
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT(@star_of_elems),NULL));
ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT(@star_of_elems),NULL))
NULL
SELECT ST_ASTEXT(ST_MAKEENVELOPE(NULL,NULL));
ST_ASTEXT(ST_MAKEENVELOPE(NULL,NULL))
NULL
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(a 0)'),ST_GEOMFROMTEXT('POINT(0 0)')));
ERROR 22023: Invalid GIS data provided to function st_geometryfromtext.
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(! 0)'),ST_GEOMFROMTEXT('POINT(0 0)')));
ERROR 22023: Invalid GIS data provided to function st_geometryfromtext.
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT('!' 0)'),ST_GEOMFROMTEXT('POINT(0 0)')));
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('POINT(0 0)')))' at line 1
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(12,34 0)'),ST_GEOMFROMTEXT('POINT(0 0)')));
ERROR 22023: Invalid GIS data provided to function st_geometryfromtext.
SELECT ST_ASTEXT(ST_MAKEENVELOPE(,));
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_ASTEXT(ST_MAKEENVELOPE(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_ASTEXT(ST_MAKEENVELOPE(,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
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)', -1024), ST_GEOMFROMTEXT('POINT(-1 1)', -1024)));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)', -1), ST_GEOMFROMTEXT('POINT(-1 1)', -1)));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)', 1), ST_GEOMFROMTEXT('POINT(-1 1)', 1)));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)', 1000), ST_GEOMFROMTEXT('POINT(-1 1)', 1000)));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)', 0), ST_GEOMFROMTEXT('POINT(-1 1)', 1)));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)', 1), ST_GEOMFROMTEXT('POINT(-1 -1)', -1)));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)', 0), ST_GEOMFROMTEXT('POINT(0 0)', 4236)));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)'), ST_GEOMFROMTEXT('MULTIPOINT(0 0)')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('MULTIPOINT(0 1)'), ST_GEOMFROMTEXT('POINT(0 0)')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('MULTIPOINT(0 1)'), ST_GEOMFROMTEXT('MULTIPOINT(0 0)')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)'), ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)'), ST_GEOMFROMTEXT('POLYGON((0 0,0 5,5 5,5 0,0 0))')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0))')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(1 1))'), ST_GEOMFROMTEXT('POINT(0 0)')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0)))')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0),GEOMETRYCOLLECTION())')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()'), ST_GEOMFROMTEXT('GEOMETRYCOLLECTION()')));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)', 10), ST_GEOMFROMTEXT('POINT(1 1)'));
ERROR HY000: Incorrect arguments to st_makeenvelope
SELECT ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'), ST_GEOMFROMTEXT('POINT(1 1e1000)'));
ERROR 22023: Invalid GIS data provided to function st_geometryfromtext.
SELECT ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 0)'));
ERROR 42000: Incorrect parameter count in the call to native function 'ST_MAKEENVELOPE'
# Clean up
DROP TABLE gis_geometrycollection;

Man Man