aboutsummaryrefslogtreecommitdiff
path: root/src/test/regress/expected/geometry.out
blob: a572587d2ff987a3b9709a8169cb94e92865f112 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
QUERY: SELECT point(f1) FROM CIRCLE_TBL;
point    
---------
(0,0)    
(1,2)    
(1,3)    
(1,2)    
(100,200)
(100,0)  
(6 rows)

QUERY: SELECT '' AS two, p1.f1
    FROM POINT_TBL p1
    WHERE ishorizontal(p1.f1, '(0,0)'::point);
two|f1     
---+-------
   |(0,0)  
   |(-10,0)
(2 rows)

QUERY: SELECT '' AS one, p1.f1
    FROM POINT_TBL p1
    WHERE isvertical(p1.f1, '(5.1,34.5)'::point);
one|f1        
---+----------
   |(5.1,34.5)
(1 row)

QUERY: SELECT center(f1) FROM BOX_TBL;
center 
-------
(1,1)  
(2,2)  
(2.5,3)
(3,3)  
(4 rows)

QUERY: SELECT box(f1) FROM CIRCLE_TBL;
WARN:func_get_detail: function box(circle) does not exist
QUERY: SELECT '' AS count, b.f1 + p.f1
    FROM BOX_TBL b, POINT_TBL p;
NOTICE:there is no operator + for types box and point
NOTICE:You will either have to retype this query using an
NOTICE:explicit cast, or you will have to define the operator
WARN:+ for box and point using CREATE OPERATOR
QUERY: SELECT '' AS count, b.f1 * p.f1
    FROM BOX_TBL b, POINT_TBL p;
NOTICE:there is no operator * for types box and point
NOTICE:You will either have to retype this query using an
NOTICE:explicit cast, or you will have to define the operator
WARN:* for box and point using CREATE OPERATOR
QUERY: SET geqo TO 'off';
QUERY: SELECT points(f1) AS npoints, f1 AS path FROM PATH_TBL;
npoints|path                     
-------+-------------------------
      2|[(1,2),(3,4)]            
      2|((1,2),(3,4))            
      4|[(0,0),(3,0),(4,5),(1,6)]
      2|((1,2),(3,4))            
      2|((1,2),(3,4))            
      2|[(1,2),(3,4)]            
      2|[(11,12),(13,14)]        
      2|((11,12),(13,14))        
(8 rows)

QUERY: SELECT path(f1) FROM POLYGON_TBL;
path               
-------------------
((2,0),(2,4),(0,0))
((3,1),(3,3),(1,0))
((0,0))            
((0,1),(0,1))      
(4 rows)

QUERY: SELECT '' AS eight, p1.f1 + '(10,10)'::point AS dist_add
    FROM PATH_TBL p1;
eight|dist_add                         
-----+---------------------------------
     |[(11,12),(13,14)]                
     |((11,12),(13,14))                
     |[(10,10),(13,10),(14,15),(11,16)]
     |((11,12),(13,14))                
     |((11,12),(13,14))                
     |[(11,12),(13,14)]                
     |[(21,22),(23,24)]                
     |((21,22),(23,24))                
(8 rows)

QUERY: SELECT '' AS eight, p1.f1 * '(2,-1)'::point AS dist_mul
    FROM PATH_TBL p1;
eight|dist_mul                    
-----+----------------------------
     |[(4,3),(10,5)]              
     |((4,3),(10,5))              
     |[(0,0),(6,-3),(13,6),(8,11)]
     |((4,3),(10,5))              
     |((4,3),(10,5))              
     |[(4,3),(10,5)]              
     |[(34,13),(40,15)]           
     |((34,13),(40,15))           
(8 rows)

QUERY: RESET geqo;
QUERY: SELECT points(f1) AS npoints, f1 AS polygon FROM POLYGON_TBL;
npoints|polygon            
-------+-------------------
      3|((2,0),(2,4),(0,0))
      3|((3,1),(3,3),(1,0))
      1|((0,0))            
      2|((0,1),(0,1))      
(4 rows)

QUERY: SELECT polygon(f1) FROM BOX_TBL;
polygon                                  
-----------------------------------------
((0,0),(0,2),(2,2),(2,0))                
((1,1),(1,3),(3,3),(3,1))                
((2.5,2.5),(2.5,3.5),(2.5,3.5),(2.5,2.5))
((3,3),(3,3),(3,3),(3,3))                
(4 rows)

QUERY: SELECT polygon(f1) FROM PATH_TBL WHERE isclosed(f1);
polygon          
-----------------
((1,2),(3,4))    
((1,2),(3,4))    
((1,2),(3,4))    
((11,12),(13,14))
(4 rows)

QUERY: SELECT f1 AS open_path, polygon( pclose(f1)) AS polygon FROM PATH_TBL WHERE isopen(f1);
open_path                |polygon                  
-------------------------+-------------------------
[(1,2),(3,4)]            |((1,2),(3,4))            
[(0,0),(3,0),(4,5),(1,6)]|((0,0),(3,0),(4,5),(1,6))
[(1,2),(3,4)]            |((1,2),(3,4))            
[(11,12),(13,14)]        |((11,12),(13,14))        
(4 rows)

QUERY: SELECT polygon(f1) FROM CIRCLE_TBL;
polygon                                                                                                                                                                                                                                                                             
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
((-3,0),(-2.59807621135332,1.5),(-1.5,2.59807621135332),(-1.83690953073357e-16,3),(1.5,2.59807621135332),(2.59807621135332,1.5),(3,3.67381906146713e-16),(2.59807621135332,-1.5),(1.5,-2.59807621135332),(5.5107285922007e-16,-3),(-1.5,-2.59807621135332),(-2.59807621135332,-1.5))
((-99,2),(-85.6025403784439,52),(-49,88.6025403784439),(0.999999999999994,102),(51,88.6025403784439),(87.6025403784439,52),(101,2.00000000000001),(87.6025403784439,-48),(51,-84.6025403784438),(1.00000000000002,-98),(-49,-84.6025403784439),(-85.6025403784438,-48))             
((-4,3),(-3.33012701892219,5.5),(-1.5,7.33012701892219),(1,8),(3.5,7.33012701892219),(5.33012701892219,5.5),(6,3),(5.33012701892219,0.500000000000001),(3.5,-1.33012701892219),(1,-2),(-1.5,-1.33012701892219),(-3.33012701892219,0.499999999999998))                               
((-2,2),(-1.59807621135332,3.5),(-0.5,4.59807621135332),(1,5),(2.5,4.59807621135332),(3.59807621135332,3.5),(4,2),(3.59807621135332,0.500000000000001),(2.5,-0.598076211353315),(1,-1),(-0.5,-0.598076211353316),(-1.59807621135332,0.499999999999999))                             
((90,200),(91.3397459621556,205),(95,208.660254037844),(100,210),(105,208.660254037844),(108.660254037844,205),(110,200),(108.660254037844,195),(105,191.339745962156),(100,190),(95,191.339745962156),(91.3397459621556,195))                                                      
((0,0),(13.3974596215561,50),(50,86.6025403784439),(100,100),(150,86.6025403784439),(186.602540378444,50),(200,1.22460635382238e-14),(186.602540378444,-50),(150,-86.6025403784438),(100,-100),(50,-86.6025403784439),(13.3974596215562,-50))                                       
(6 rows)

QUERY: SELECT polygon(8, f1) FROM CIRCLE_TBL;
polygon                                                                                                                                                                                                                                 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
((-3,0),(-2.12132034355964,2.12132034355964),(-1.83690953073357e-16,3),(2.12132034355964,2.12132034355964),(3,3.67381906146713e-16),(2.12132034355964,-2.12132034355964),(5.5107285922007e-16,-3),(-2.12132034355964,-2.12132034355964))
((-99,2),(-69.7106781186548,72.7106781186548),(0.999999999999994,102),(71.7106781186547,72.7106781186548),(101,2.00000000000001),(71.7106781186548,-68.7106781186547),(1.00000000000002,-98),(-69.7106781186547,-68.7106781186548))     
((-4,3),(-2.53553390593274,6.53553390593274),(1,8),(4.53553390593274,6.53553390593274),(6,3),(4.53553390593274,-0.535533905932737),(1,-2),(-2.53553390593274,-0.535533905932738))                                                       
((-2,2),(-1.12132034355964,4.12132034355964),(1,5),(3.12132034355964,4.12132034355964),(4,2),(3.12132034355964,-0.121320343559642),(1,-1),(-1.12132034355964,-0.121320343559643))                                                       
((90,200),(92.9289321881345,207.071067811865),(100,210),(107.071067811865,207.071067811865),(110,200),(107.071067811865,192.928932188135),(100,190),(92.9289321881345,192.928932188135))                                                
((0,0),(29.2893218813452,70.7106781186548),(100,100),(170.710678118655,70.7106781186548),(200,1.22460635382238e-14),(170.710678118655,-70.7106781186547),(100,-100),(29.2893218813453,-70.7106781186548))                               
(6 rows)

QUERY: SELECT circle( f1, 50.0) FROM POINT_TBL;
circle         
---------------
<(0,0),50>     
<(-10,0),50>   
<(-3,4),50>    
<(5.1,34.5),50>
<(-5,-12),50>  
<(10,10),50>   
(6 rows)

QUERY: SELECT '' AS twentyfour, c1.f1 AS circle, p1.f1 AS point, (p1.f1 <===> c1.f1) AS distance
 from CIRCLE_TBL c1, POINT_TBL p1
 WHERE (p1.f1 <===> c1.f1) > 0
 ORDER BY distance, circle;
twentyfour|circle        |point     |         distance
----------+--------------+----------+-----------------
          |<(100,0),100> |(5.1,34.5)|0.976531926977964
          |<(1,2),3>     |(-3,4)    | 1.47213595499958
          |<(0,0),3>     |(-3,4)    |                2
          |<(100,0),100> |(-3,4)    | 3.07764064044151
          |<(100,0),100> |(-5,-12)  | 5.68348972285122
          |<(1,3),5>     |(10,10)   | 6.40175425099138
          |<(1,3),5>     |(-10,0)   | 6.40175425099138
          |<(0,0),3>     |(-10,0)   |                7
          |<(1,2),3>     |(-10,0)   | 8.18033988749895
          |<(1,2),3>     |(10,10)   |  9.0415945787923
          |<(0,0),3>     |(-5,-12)  |               10
          |<(100,0),100> |(-10,0)   |               10
          |<(0,0),3>     |(10,10)   |  11.142135623731
          |<(1,3),5>     |(-5,-12)  | 11.1554944214035
          |<(1,2),3>     |(-5,-12)  | 12.2315462117278
          |<(1,3),5>     |(5.1,34.5)| 26.7657047773224
          |<(1,2),3>     |(5.1,34.5)|  29.757594539282
          |<(0,0),3>     |(5.1,34.5)| 31.8749193547455
          |<(100,200),10>|(5.1,34.5)| 180.778038568384
          |<(100,200),10>|(10,10)   | 200.237960416286
          |<(100,200),10>|(-3,4)    | 211.415898254845
          |<(100,200),10>|(0,0)     | 213.606797749979
          |<(100,200),10>|(-10,0)   | 218.254244210267
          |<(100,200),10>|(-5,-12)  | 226.577682802077
(24 rows)