Debian Codegraph @

mysql-test/suite/gis/r/st_latitude.result

raw
1 # NULL as one of the parameters must result in NULL return value.
2 SELECT ST_LATITUDE(NULL);
3 ST_LATITUDE(NULL)
4 NULL
5 SELECT ST_LATITUDE(NULL, NULL);
6 ST_LATITUDE(NULL, NULL)
7 NULL
8 SELECT ST_LATITUDE(NULL, 1);
9 ST_LATITUDE(NULL, 1)
10 NULL
11 SELECT ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326), NULL);
12 ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326), NULL)
13 NULL
14 # Invalid data is not allowed.
15 DO ST_LATITUDE(x'000000000123456789abcdef');
16 ERROR 22023: Invalid GIS data provided to function st_latitude.
17 DO ST_LATITUDE(x'000000000123456789abcdef', 1);
18 ERROR 22023: Invalid GIS data provided to function st_latitude.
19 # New value must be within the allowed range.
20 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326), -90.000000001);
21 ERROR 22S03: Latitude -90.000000 is out of range in function st_latitude. It must be within [-90.000000, 90.000000].
22 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326), 90.000000001);
23 ERROR 22S03: Latitude 90.000000 is out of range in function st_latitude. It must be within [-90.000000, 90.000000].
24 # First parameter must be a point.
25 # Cartesian SRID 0
26 DO ST_LATITUDE(ST_GEOMFROMTEXT('LINESTRING(0 0, 1 1)', 0));
27 ERROR 22S01: POINT value is a geometry of unexpected type LINESTRING in st_latitude.
28 DO ST_LATITUDE(ST_GEOMFROMTEXT('POLYGON((0 0, 0 1, 1 1, 0 0))', 0));
29 ERROR 22S01: POINT value is a geometry of unexpected type POLYGON in st_latitude.
30 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOINT((0 0))', 0));
31 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOINT in st_latitude.
32 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOINT((0 0), (1 1))', 0));
33 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOINT in st_latitude.
34 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTILINESTRING((0 0, 1 1))', 0));
35 ERROR 22S01: POINT value is a geometry of unexpected type MULTILINESTRING in st_latitude.
36 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0, 0 1, 1 1, 0 0)))', 0));
37 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOLYGON in st_latitude.
38 DO ST_LATITUDE(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0))', 0));
39 ERROR 22S01: POINT value is a geometry of unexpected type GEOMCOLLECTION in st_latitude.
40 # Projected
41 DO ST_LATITUDE(ST_GEOMFROMTEXT('LINESTRING(0 0, 1 1)', 3857));
42 ERROR 22S01: POINT value is a geometry of unexpected type LINESTRING in st_latitude.
43 DO ST_LATITUDE(ST_GEOMFROMTEXT('POLYGON((0 0, 0 1, 1 1, 0 0))', 3857));
44 ERROR 22S01: POINT value is a geometry of unexpected type POLYGON in st_latitude.
45 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOINT((0 0))', 3857));
46 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOINT in st_latitude.
47 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOINT((0 0), (1 1))', 3857));
48 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOINT in st_latitude.
49 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTILINESTRING((0 0, 1 1))', 3857));
50 ERROR 22S01: POINT value is a geometry of unexpected type MULTILINESTRING in st_latitude.
51 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0, 0 1, 1 1, 0 0)))', 3857));
52 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOLYGON in st_latitude.
53 DO ST_LATITUDE(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0))', 3857));
54 ERROR 22S01: POINT value is a geometry of unexpected type GEOMCOLLECTION in st_latitude.
55 # Geographic
56 DO ST_LATITUDE(ST_GEOMFROMTEXT('LINESTRING(0 0, 1 1)', 4326));
57 ERROR 22S01: POINT value is a geometry of unexpected type LINESTRING in st_latitude.
58 DO ST_LATITUDE(ST_GEOMFROMTEXT('POLYGON((0 0, 0 1, 1 1, 0 0))', 4326));
59 ERROR 22S01: POINT value is a geometry of unexpected type POLYGON in st_latitude.
60 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOINT((0 0))', 4326));
61 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOINT in st_latitude.
62 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOINT((0 0), (1 1))', 4326));
63 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOINT in st_latitude.
64 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTILINESTRING((0 0, 1 1))', 4326));
65 ERROR 22S01: POINT value is a geometry of unexpected type MULTILINESTRING in st_latitude.
66 DO ST_LATITUDE(ST_GEOMFROMTEXT('MULTIPOLYGON(((0 0, 0 1, 1 1, 0 0)))', 4326));
67 ERROR 22S01: POINT value is a geometry of unexpected type MULTIPOLYGON in st_latitude.
68 DO ST_LATITUDE(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(POINT(0 0))', 4326));
69 ERROR 22S01: POINT value is a geometry of unexpected type GEOMCOLLECTION in st_latitude.
70 # Point must be geographic.
71 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 0));
72 ERROR 22S00: Function st_latitude is only defined for geographic spatial reference systems, but one of its arguments is in SRID 0, which is not geographic.
73 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 3857));
74 ERROR 22S00: Function st_latitude is only defined for geographic spatial reference systems, but one of its arguments is in SRID 3857, which is not geographic.
75 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326));
76 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 0), 1);
77 ERROR 22S00: Function st_latitude is only defined for geographic spatial reference systems, but one of its arguments is in SRID 0, which is not geographic.
78 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 3857), 1);
79 ERROR 22S00: Function st_latitude is only defined for geographic spatial reference systems, but one of its arguments is in SRID 3857, which is not geographic.
80 DO ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326), 1);
81 # Get or set the latitude of a point in a lat-long SRS.
82 SELECT ST_LATITUDE(ST_GEOMFROMTEXT('POINT(1 0)', 4326));
83 ST_LATITUDE(ST_GEOMFROMTEXT('POINT(1 0)', 4326))
84 1
85 SELECT HEX(ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326), 1));
86 HEX(ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 4326), 1))
87 E610000001010000000000000000000000000000000000F03F
88 # Get or set the latitude of a point in a long-lat SRS.
89 SELECT ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 1)', 7035));
90 ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 1)', 7035))
91 1
92 SELECT HEX(ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 7035), 1));
93 HEX(ST_LATITUDE(ST_GEOMFROMTEXT('POINT(0 0)', 7035), 1))
94 7B1B000001010000000000000000000000000000000000F03F
95 # Get or set the latitude of a point in a lat-long SRS with a meridian
96 # that doesn't go through Greenwich.
97 SELECT ST_LATITUDE(ST_GEOMFROMTEXT('POINT(1 0)', 4801));
98 ST_LATITUDE(ST_GEOMFROMTEXT('POINT(1 0)', 4801))
99 1
100 SELECT HEX(ST_LATITUDE(ST_GEOMFROMTEXT('POINT(1 0)', 4801), 1));
101 HEX(ST_LATITUDE(ST_GEOMFROMTEXT('POINT(1 0)', 4801), 1))
102 C112000001010000000000000000000000000000000000F03F