|
1 | | -CREATE TABLE IF NOT EXISTS PointsOfInterest ( |
2 | | - id INTEGER, poi JSON, |
3 | | -PRIMARY KEY(id)); |
4 | | - |
5 | | -INSERT INTO PointsOfInterest VALUES ( |
6 | | - 1, |
7 | | - { |
8 | | - "kind" : "city hall", |
9 | | - "address" : { |
10 | | - "state" : "CA", |
11 | | - "city" : "Campbell", |
12 | | - "street" : "70 North 1st street" |
13 | | - }, |
14 | | - "location" : { |
15 | | - "type" : "point", |
16 | | - "coordinates": [-120.673828125,38.85682013474361] |
17 | | - } |
18 | | - } |
19 | | -); |
20 | | - |
21 | | -INSERT INTO PointsOfInterest VALUES ( |
22 | | - 2, |
23 | | - { |
24 | | - "kind" : "nature park", |
25 | | - "name" : "portola redwoods state park", |
26 | | - "address" : { |
27 | | - "state" : "CA", |
28 | | - "city" : "Los Gatos", |
29 | | - "street" : "15000 Skyline Blvd" |
30 | | - }, |
31 | | - "location" : { |
32 | | - "type" : "polygon", |
33 | | - |
34 | | - "coordinates": [ |
35 | | - [ |
36 | | - [ |
37 | | - -122.18101501464844, |
38 | | - 37.2374353328716 |
39 | | - ], |
40 | | - [ |
41 | | - -122.13775634765625, |
42 | | - 37.243448378654115 |
43 | | - ], |
44 | | - [ |
45 | | - -122.15698242187499, |
46 | | - 37.28279464911045 |
47 | | - ], |
48 | | - [ |
49 | | - -122.20642089843749, |
50 | | - 37.276238364942955 |
51 | | - ], |
52 | | - [ |
53 | | - -122.22015380859374, |
54 | | - 37.2587521486561 |
55 | | - ], |
56 | | - [ |
57 | | - -122.21054077148438, |
58 | | - 37.2401685949667 |
59 | | - ], |
60 | | - [ |
61 | | - -122.17758178710939, |
62 | | - 37.2368886685595 |
63 | | - ], |
64 | | - [ |
65 | | - -122.18101501464844, |
66 | | - 37.2374353328716 |
67 | | - ] |
68 | | - ] |
69 | | - ] |
70 | | - } |
71 | | - } |
72 | | -); |
73 | | - |
74 | | -INSERT INTO PointsOfInterest VALUES ( |
75 | | - 3, |
76 | | - { |
77 | | - "kind" : "gas station", |
78 | | - "address" : { |
79 | | - "state" : "CA", |
80 | | - "city" : "Campbell", |
81 | | - "street" : "63 South 1st street" |
82 | | - }, |
83 | | - "location" : { |
84 | | - "type" : "point", |
85 | | - "coordinates": [-121.95922851562501,37.302460074782296] |
86 | | - } |
87 | | - } |
88 | | -); |
89 | | - |
90 | | -INSERT INTO PointsOfInterest VALUES ( |
91 | | - 4, |
92 | | - { |
93 | | - "kind" : "restaurant", |
94 | | - "name" : "Effie's Restaurant and Bar" |
95 | | - "address" : { |
96 | | - "state" : "CA", |
97 | | - "city" : "Campbell", |
98 | | - "street" : "80 Woodeard St" |
99 | | - }, |
100 | | - "location" : { |
101 | | - "type" : "point", |
102 | | - "coordinates": [-121.95922851562501,37.302460074782296] |
103 | | - } |
104 | | - } |
105 | | -); |
106 | | - |
107 | | -INSERT INTO PointsOfInterest VALUES ( |
108 | | - 5, |
109 | | - { |
110 | | - "kind" : "gas station", |
111 | | - "address" : { |
112 | | - "state" : "CA", |
113 | | - "city" : "Campbell", |
114 | | - "street" : "33 North Avenue" |
115 | | - }, |
116 | | - "location" : { |
117 | | - "type" : "point", |
118 | | - "coordinates": [-121.91768646240233,37.292081740702365] |
119 | | - } |
120 | | - } |
121 | | -); |
122 | | - |
123 | | -INSERT INTO PointsOfInterest VALUES ( |
124 | | - 6, |
125 | | - { |
126 | | - "kind" : "hospital", |
127 | | - "name" : "St. Marthas hospital", |
128 | | - "address" : { |
129 | | - "state" : "CA", |
130 | | - "city" : "Cupertino", |
131 | | - "street" : "18000 West Blvd" |
132 | | - }, |
133 | | - "location" : { |
134 | | - "type" : "point", |
135 | | - "coordinates": [-122.04093933105469,37.32949164059004] |
136 | | - } |
137 | | - } |
138 | | -); |
139 | | - |
140 | | -INSERT INTO PointsOfInterest VALUES ( |
141 | | - 7, |
142 | | - { |
143 | | - "kind" : "restaurant", |
144 | | - "name" : "Coach Sports Bar & Grill", |
145 | | - "address" : { |
146 | | - "state" : "CA", |
147 | | - "city" : "Campbell", |
148 | | - "street" : "80 Edward St" |
149 | | - }, |
150 | | - "location" : { |
151 | | - "type" : "point", |
152 | | - "coordinates": [-121.94935798645021,37.281292217764246] |
153 | | - } |
154 | | - } |
155 | | -); |
156 | | - |
157 | | -INSERT INTO PointsOfInterest VALUES ( |
158 | | - 8, |
159 | | - { |
160 | | - "kind" : "hospital", |
161 | | - "name" : "Memorial hospital", |
162 | | - "address" : { |
163 | | - "state" : "CA", |
164 | | - "city" : "Cupertino", |
165 | | - "street" : "10500 South St" |
166 | | - }, |
167 | | - "location" : { |
168 | | - "type" : "point", |
169 | | - "coordinates": [-122.00763702392578,37.32526006760127] |
170 | | - } |
171 | | - } |
172 | | -); |
173 | | - |
174 | | -INSERT INTO PointsOfInterest VALUES ( |
175 | | - 9, |
176 | | - { |
177 | | - "kind" : "restaurant", |
178 | | - "name" : "Ricos Taco", |
179 | | - "address" : { |
180 | | - "state" : "CA", |
181 | | - "city" : "Campbell", |
182 | | - "street" : "80 East Boulevard St" |
183 | | - }, |
184 | | - "location" : { |
185 | | - "type" : "point", |
186 | | - "coordinates": [-121.95004463195802,37.27705793169547] |
187 | | - } |
188 | | - } |
189 | | -); |
190 | | - |
191 | | - |
192 | | - |
193 | | -INSERT INTO PointsOfInterest VALUES ( |
194 | | - 10, |
195 | | - { |
196 | | - "kind" : "nature park", |
197 | | - "name" : "Yosemite national park", |
198 | | - "address" : { |
199 | | - "state" : "CA", |
200 | | - "city" : "Greeley Hill", |
201 | | - "street" : "1549 East Lane" |
202 | | - }, |
203 | | - "location" : { |
204 | | - "type" : "polygon", |
205 | | - |
206 | | -"coordinates": [ |
207 | | - [ |
208 | | - [ |
209 | | - -119.9652099609375, |
210 | | - 37.94419750075404 |
211 | | - ], |
212 | | - [ |
213 | | - -120.0750732421875, |
214 | | - 37.61858263247881 |
215 | | - ], |
216 | | - [ |
217 | | - -119.5477294921875, |
218 | | - 37.496652341233364 |
219 | | - ], |
220 | | - [ |
221 | | - -119.22912597656249, |
222 | | - 37.75768707689704 |
223 | | - ], |
224 | | - [ |
225 | | - -119.33898925781251, |
226 | | - 37.98750437106374 |
227 | | - ], |
228 | | - [ |
229 | | - -119.9652099609375, |
230 | | - 37.94419750075404 |
231 | | - ] |
232 | | - ] |
233 | | - ] |
234 | | - } |
235 | | - } |
236 | | -); |
237 | | - |
238 | | -INSERT INTO PointsOfInterest VALUES ( |
239 | | - 11, |
240 | | - { |
241 | | - "kind" : "house", |
242 | | - "county" : "Kinga", |
243 | | - "contact" : "469 384 7612", |
244 | | - "address" : { |
245 | | - "state" : "Texas", |
246 | | - "city" : "Gatesville", |
247 | | - "street" : "1549 North Lane" |
248 | | - }, |
249 | | - "location" : { |
250 | | - "type" : "polygon", |
251 | | - |
252 | | - "coordinates": [ |
253 | | - [ |
254 | | - [ |
255 | | - -97.93212890625, |
256 | | - 31.648705289976853 |
257 | | - ], |
258 | | - [ |
259 | | - -98.4375, |
260 | | - 31.695455797778713 |
261 | | - ], |
262 | | - [ |
263 | | - -98.44848632812499, |
264 | | - 31.541089879585808 |
265 | | - ], |
266 | | - [ |
267 | | - -98.26171875, |
268 | | - 31.512995857454676 |
269 | | - ], |
270 | | - [ |
271 | | - -97.943115234375, |
272 | | - 31.66740831708089 |
273 | | - ], |
274 | | - [ |
275 | | - -97.93212890625, |
276 | | - 31.648705289976853 |
277 | | - ] |
278 | | - ] |
279 | | - ] |
280 | | - } |
281 | | - } |
282 | | -); |
| 1 | +### Begin Script ### |
| 2 | +load -file geoschema.ddl |
| 3 | +import -table PointsOfInterest -file geoschema.json |
| 4 | +### End Script ### |
0 commit comments