2
2
-- Points
3
3
--
4
4
5
- SELECT ' ' AS xxx , center(f1) AS center
5
+ SELECT ' ' AS four , center(f1) AS center
6
6
FROM BOX_TBL;
7
7
8
- SELECT ' ' AS xxx , (@@ f1) AS center
8
+ SELECT ' ' AS four , (@@ f1) AS center
9
9
FROM BOX_TBL;
10
10
11
- SELECT ' ' AS xxx , point (f1) AS center
11
+ SELECT ' ' AS six , point (f1) AS center
12
12
FROM CIRCLE_TBL;
13
13
14
- SELECT ' ' AS xxx , (@@ f1) AS center
14
+ SELECT ' ' AS six , (@@ f1) AS center
15
15
FROM CIRCLE_TBL;
16
16
17
- SELECT ' ' AS xxx , (@@ f1) AS center
17
+ SELECT ' ' AS two , (@@ f1) AS center
18
18
FROM POLYGON_TBL
19
19
WHERE (# f1) > 2;
20
20
@@ -43,11 +43,11 @@ SELECT '' AS one, p1.f1
43
43
--
44
44
45
45
-- intersection
46
- SELECT ' ' AS xxx , p .f1 , l .s , l .s # p.f1 AS intersection
46
+ SELECT ' ' AS count , p .f1 , l .s , l .s # p.f1 AS intersection
47
47
FROM LSEG_TBL l, POINT_TBL p;
48
48
49
49
-- closest point
50
- SELECT ' ' AS xxx , p .f1 , l .s , p .f1 # # l.s AS closest
50
+ SELECT ' ' AS thirty , p .f1 , l .s , p .f1 # # l.s AS closest
51
51
FROM LSEG_TBL l, POINT_TBL p;
52
52
53
53
--
@@ -58,20 +58,20 @@ SELECT '' AS xxx, p.f1, l.s, p.f1 ## l.s AS closest
58
58
-- Boxes
59
59
--
60
60
61
- SELECT box (f1) AS box FROM CIRCLE_TBL;
61
+ SELECT ' ' as six, box (f1) AS box FROM CIRCLE_TBL;
62
62
63
63
-- translation
64
- SELECT ' ' AS count , b .f1 + p .f1 AS translation
64
+ SELECT ' ' AS twentyfour , b .f1 + p .f1 AS translation
65
65
FROM BOX_TBL b, POINT_TBL p;
66
66
67
- SELECT ' ' AS count , b .f1 - p .f1 AS translation
67
+ SELECT ' ' AS twentyfour , b .f1 - p .f1 AS translation
68
68
FROM BOX_TBL b, POINT_TBL p;
69
69
70
70
-- scaling and rotation
71
- SELECT ' ' AS count , b .f1 * p .f1 AS rotation
71
+ SELECT ' ' AS twentyfour , b .f1 * p .f1 AS rotation
72
72
FROM BOX_TBL b, POINT_TBL p;
73
73
74
- SELECT ' ' AS count , b .f1 / p .f1 AS rotation
74
+ SELECT ' ' AS twenty , b .f1 / p .f1 AS rotation
75
75
FROM BOX_TBL b, POINT_TBL p
76
76
WHERE (p .f1 < - > ' (0,0)' ::point ) >= 1 ;
77
77
@@ -81,9 +81,9 @@ SELECT '' AS count, b.f1 / p.f1 AS rotation
81
81
82
82
SET geqo TO ' off' ;
83
83
84
- SELECT ' ' AS xxx , points(f1) AS npoints, f1 AS path FROM PATH_TBL;
84
+ SELECT ' ' AS eight , points(f1) AS npoints, f1 AS path FROM PATH_TBL;
85
85
86
- SELECT ' ' AS xxx , path (f1) FROM POLYGON_TBL;
86
+ SELECT ' ' AS four , path (f1) FROM POLYGON_TBL;
87
87
88
88
-- translation
89
89
SELECT ' ' AS eight, p1 .f1 + ' (10,10)' ::point AS dist_add
@@ -100,46 +100,46 @@ RESET geqo;
100
100
--
101
101
102
102
-- containment
103
- SELECT ' ' AS xxx , p .f1 , poly .f1 , poly .f1 ~ p .f1 AS contains
103
+ SELECT ' ' AS twentyfour , p .f1 , poly .f1 , poly .f1 ~ p .f1 AS contains
104
104
FROM POLYGON_TBL poly, POINT_TBL p;
105
105
106
- SELECT ' ' AS xxx , p .f1 , poly .f1 , p .f1 @ poly .f1 AS contained
106
+ SELECT ' ' AS twentyfour , p .f1 , poly .f1 , p .f1 @ poly .f1 AS contained
107
107
FROM POLYGON_TBL poly, POINT_TBL p;
108
108
109
- SELECT ' ' AS xxx , points(f1) AS npoints, f1 AS polygon
109
+ SELECT ' ' AS four , points(f1) AS npoints, f1 AS polygon
110
110
FROM POLYGON_TBL;
111
111
112
- SELECT ' ' AS xxx , polygon (f1)
112
+ SELECT ' ' AS four , polygon (f1)
113
113
FROM BOX_TBL;
114
114
115
- SELECT ' ' AS xxx , polygon (f1)
115
+ SELECT ' ' AS four , polygon (f1)
116
116
FROM PATH_TBL WHERE isclosed(f1);
117
117
118
- SELECT ' ' AS xxx , f1 AS open_path, polygon ( pclose(f1)) AS polygon
118
+ SELECT ' ' AS four , f1 AS open_path, polygon ( pclose(f1)) AS polygon
119
119
FROM PATH_TBL
120
120
WHERE isopen(f1);
121
121
122
122
-- convert circles to polygons using the default number of points
123
- SELECT ' ' AS xxx , polygon (f1)
123
+ SELECT ' ' AS six , polygon (f1)
124
124
FROM CIRCLE_TBL;
125
125
126
126
-- convert the circle to an 8-point polygon
127
- SELECT ' ' AS xxx , polygon (8 , f1)
127
+ SELECT ' ' AS six , polygon (8 , f1)
128
128
FROM CIRCLE_TBL;
129
129
130
130
--
131
131
-- Circles
132
132
--
133
133
134
- SELECT ' ' AS xxx , circle (f1, 50 .0 )
134
+ SELECT ' ' AS six , circle (f1, 50 .0 )
135
135
FROM POINT_TBL;
136
136
137
- SELECT ' ' AS xxx , circle (f1)
137
+ SELECT ' ' AS four , circle (f1)
138
138
FROM BOX_TBL;
139
139
140
- SELECT ' ' AS xxx , circle (f1)
140
+ SELECT ' ' AS two , circle (f1)
141
141
FROM POLYGON_TBL
142
- WHERE (# f1) >= 2 ;
142
+ WHERE (# f1) >= 3 ;
143
143
144
144
SELECT ' ' AS twentyfour, c1 .f1 AS circle , p1 .f1 AS point , (p1 .f1 < - > c1 .f1 ) AS distance
145
145
FROM CIRCLE_TBL c1, POINT_TBL p1
0 commit comments