geoserver

Форк
0
/
cite_data_postgis2.sql 
504 строки · 13.7 Кб
1
-- This file inserts all the appropriate cite data into postgis to run with
2
-- geoserver.  To work with the tar file of featureType directories it
3
-- should be run in a database called cite, that either has a user with
4
-- a password of cite, cite, or that allows anyone read/write access.
5
-- You can also just run this script in whatever database you like with
6
-- your user name, but then you have to modify all the user access info
7
-- of the info.xml files.  Uncommenting lines at 253 will create the cite
8
-- user and grant access to it on all the relavant tables, the user you are
9
-- connecting with must have the appropriate permissions to do that.  
10

11

12
-- Uncomment and change this to the user who has permissions to drop and
13
-- create tables in this db.
14
-- \connect - cite
15

16
create extension postgis;
17

18

19
--uncomment these if you want to reset everything.
20
drop table "Nulls";
21
drop table "Points";
22
drop table "Other";
23
drop table "Lines";
24
drop table "Polygons";
25
drop table "MLines";
26
drop table "MPolygons";
27
drop table "MPoints";
28
drop table "Seven";
29
drop table "Fifteen";
30
drop table "Updates";
31
drop table "Inserts";
32
drop table "Deletes";
33
drop table "Locks";
34
delete from "geometry_columns" where srid=32615;
35

36

37

38

39
--
40
-- TOC Entry ID 23 (OID 312261)
41
--
42
-- Name: SevenFeature Type: TABLE Owner: ciesin
43
--
44

45
CREATE TABLE "Seven" (
46
	"boundedBy" geometry('POLYGON', 32615),
47
	"pointProperty" geometry('POINT', 32615)
48
);
49

50

51
--
52
-- TOC Entry ID 24 (OID 312275)
53
--
54
-- Name: NullFeature Type: TABLE Owner: cite
55
--
56

57
CREATE TABLE "Nulls" (
58
	"description" character varying,
59
	"name" character varying,
60
	"boundedBy" geometry('POLYGON', 32615),
61
	"integers" integer,
62
	"dates" date,
63
	"pointProperty" geometry('POINT', 32615)
64
);
65

66
--
67
-- TOC Entry ID 25 (OID 312300)
68
--
69
-- Name: DeleteFeature Type: TABLE Owner: cite
70
--
71

72
CREATE TABLE "Deletes" (
73
	"boundedBy" geometry('POLYGON', 32615),
74
	"id" character varying,
75
	"pointProperty" geometry('POINT', 32615)
76
);
77

78
--
79
-- TOC Entry ID 26 (OID 312305)
80
--
81
-- Name: InsertFeature Type: TABLE Owner: cite
82
--
83

84
CREATE TABLE "Inserts" (
85
	"boundedBy" geometry('POLYGON', 32615),
86
	"id" character varying,
87
	"pointProperty" geometry('POINT', 32615)
88
);
89

90

91
--
92
-- TOC Entry ID 27 (OID 312310)
93
--
94
-- Name: UpdateFeature Type: TABLE Owner: cite
95
--
96

97
CREATE TABLE "Updates" (
98
	"boundedBy" geometry('POLYGON', 32615),
99
	"id" character varying,
100
	"pointProperty" geometry('POINT', 32615)
101
);
102

103
--
104
-- TOC Entry ID 28 (OID 312315)
105
--
106
-- Name: PointFeature Type: TABLE Owner: cite
107
--
108

109
CREATE TABLE "Points" (
110
	"id" character varying,
111
	"pointProperty" geometry('POINT', 32615)
112
);
113

114
--
115
-- TOC Entry ID 29 (OID 312322)
116
--
117
-- Name: LineStringFeature Type: TABLE Owner: cite
118
--
119

120
CREATE TABLE "Lines" (
121
	"id" character varying,
122
	"lineStringProperty" geometry('LINESTRING', 32615)
123
);
124

125
--
126
-- TOC Entry ID 30 (OID 312329)
127
--
128
-- Name: PolygonFeature Type: TABLE Owner: cite
129
--
130

131
CREATE TABLE "Polygons" (
132
	"id" character varying,
133
	"polygonProperty" geometry('POLYGON', 32615)
134
);
135

136
--
137
-- TOC Entry ID 31 (OID 312335)
138
--
139
-- Name: MultiPointFeature Type: TABLE Owner: cite
140
--
141

142
CREATE TABLE "MPoints" (
143
	"id" character varying,
144
	"multiPointProperty" geometry('MULTIPOINT', 32615)
145
) WITH OIDS;
146

147
--
148
-- TOC Entry ID 32 (OID 312341)
149
--
150
-- Name: MultiLineStringFeature Type: TABLE Owner: cite
151
--
152

153
CREATE TABLE "MLines" (
154
	"id" character varying,
155
	"multiLineStringProperty" geometry('MULTILINESTRING', 32615)
156
);
157

158
--
159
-- TOC Entry ID 33 (OID 312348)
160
--
161
-- Name: MultiPolygonFeature Type: TABLE Owner: cite
162
--
163

164
CREATE TABLE "MPolygons" (
165
	"id" character varying,
166
	"multiPolygonProperty" geometry('MULTIPOLYGON', 32615)
167
);
168

169
--
170
-- TOC Entry ID 34 (OID 312391)
171
--
172
-- Name: FifteenFeature Type: TABLE Owner: cite
173
--
174

175
CREATE TABLE "Fifteen" (
176
	"boundedBy" geometry('POLYGON', 32615),
177
	"pointProperty" geometry('POINT', 32615)
178
);
179

180
--
181
-- TOC Entry ID 35 (OID 312430)
182
--
183
-- Name: LockFeature Type: TABLE Owner: cite
184
--
185

186
CREATE TABLE "Locks" (
187
	"boundedBy" geometry('POLYGON', 32615),
188
	"id" character varying, 
189
	"pointProperty" geometry('POINT', 32615)
190
);
191

192
--
193
-- TOC Entry ID 36 (OID 312570)
194
--
195
-- Name: OtherFeature Type: TABLE Owner: cite
196
--
197

198
CREATE TABLE "Other" (
199
	"description" character varying,
200
	"name" character varying,
201
	"boundedBy" geometry('POLYGON', 32615),
202
	"pointProperty" geometry('POINT', 32615),
203
	"string1" character varying NOT NULL,
204
	"string2" character varying,
205
	"integers" integer,
206
	"dates" date
207
);
208

209
--
210
-- Data for TOC Entry ID 39 (OID 113496)
211
--
212
-- Name: county Type: TABLE DATA Owner: public
213
--
214

215

216
 
217

218
COPY "Seven" FROM stdin;
219
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
220
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
221
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
222
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
223
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
224
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
225
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
226
\.
227
--
228
-- Data for TOC Entry ID 59 (OID 312275)
229
--
230
-- Name: NullFeature Type: TABLE DATA Owner: public
231
--
232

233

234
COPY "Nulls" FROM stdin;
235
nullFeature	\N	SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	\N	\N	\N
236
\.
237
--
238
-- Data for TOC Entry ID 60 (OID 312300)
239
--
240
-- Name: DeleteFeature Type: TABLE DATA Owner: public
241
--
242

243

244
COPY "Deletes" FROM stdin;
245
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	td0001	SRID=32615;POINT(500050 500050)
246
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	td0002	SRID=32615;POINT(500050 500050)
247
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	td0003	SRID=32615;POINT(500050 500050)
248
\.
249
--
250
-- Data for TOC Entry ID 61 (OID 312305)
251
--
252
-- Name: InsertFeature Type: TABLE DATA Owner: public
253
--
254

255

256
COPY "Inserts" FROM stdin;
257
\.
258
--
259
-- Data for TOC Entry ID 62 (OID 312310)
260
--
261
-- Name: UpdateFeature Type: TABLE DATA Owner: public
262
--
263

264

265
COPY "Updates" FROM stdin;
266
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	tu0001	SRID=32615;POINT(500050 500050)
267
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	tu0002	SRID=32615;POINT(500050 500050)
268
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	tu0003	SRID=32615;POINT(500050 500050)
269
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	tu0004	SRID=32615;POINT(500050 500050)
270
\.
271
--
272
-- Data for TOC Entry ID 63 (OID 312315)
273
--
274
-- Name: PointFeature Type: TABLE DATA Owner: public
275
--
276

277

278
COPY "Points" FROM stdin;
279
t0000	SRID=32615;POINT(500050 500050)
280
\.
281
--
282
-- Data for TOC Entry ID 64 (OID 312322)
283
--
284
-- Name: LineStringFeature Type: TABLE DATA Owner: public
285
--
286

287

288
COPY "Lines" FROM stdin;
289
t0001	SRID=32615;LINESTRING(500125 500025,500175 500075)
290
\.
291
--
292
-- Data for TOC Entry ID 65 (OID 312329)
293
--
294
-- Name: PolygonFeature Type: TABLE DATA Owner: public
295
--
296

297

298
COPY "Polygons" FROM stdin;
299
t0002	SRID=32615;POLYGON((500225 500025,500225 500075,500275 500050,500275 500025,500225 500025))
300
\.
301
--
302
-- Data for TOC Entry ID 66 (OID 312335)
303
--
304
-- Name: MultiPointFeature Type: TABLE DATA Owner: public
305
--
306

307

308
COPY "MPoints" FROM stdin;
309
t0003	SRID=32615;MULTIPOINT(500325 500025,500375 500075)
310
\.
311
--
312
-- Data for TOC Entry ID 67 (OID 312341)
313
--
314
-- Name: MultiLineStringFeature Type: TABLE DATA Owner: public
315
--
316

317

318
COPY "MLines" FROM stdin;
319
t0004	SRID=32615;MULTILINESTRING((500425 500025,500475 500075),(500425 500075,500475 500025))
320
\.
321
--
322
-- Data for TOC Entry ID 68 (OID 312348)
323
--
324
-- Name: MultiPolygonFeature Type: TABLE DATA Owner: public
325
--
326

327

328
COPY "MPolygons" FROM stdin;
329
t0005	SRID=32615;MULTIPOLYGON(((500525 500025,500550 500050,500575 500025,500525 500025)),((500525 500050,500525 500075,500550 500075,500550 500050,500525 500050)))
330
\.
331
--
332
-- Data for TOC Entry ID 69 (OID 312391)
333
--
334
-- Name: FifteenFeature Type: TABLE DATA Owner: public
335
--
336

337

338
COPY "Fifteen" FROM stdin;
339
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
340
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
341
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
342
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
343
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
344
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
345
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
346
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
347
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
348
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
349
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
350
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
351
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
352
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
353
SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)
354
\.
355
--
356
-- Data for TOC Entry ID 70 (OID 312430)
357
--
358
-- Name: LockFeature Type: TABLE DATA Owner: public
359
--
360

361

362
COPY "Locks" FROM stdin;
363
\N	lfla0001	\N
364
\N	lfla0002	\N
365
\N	lfla0003	\N
366
\N	lfla0004	\N
367
\N	gfwlla0001	\N
368
\N	gfwlla0002	\N
369
\N	gfwlla0003	\N
370
\N	gfwlla0004	\N
371
\N	lfbt0001	\N
372
\N	lfbt0002	\N
373
\N	lfbt0003	\N
374
\N	lfbt0004	\N
375
\N	lfbt0005	\N
376
\N	lfbt0006	\N
377
\N	gfwlbt0001	\N
378
\N	gfwlbt0002	\N
379
\N	gfwlbt0003	\N
380
\N	gfwlbt0004	\N
381
\N	gfwlbt0005	\N
382
\N	gfwlbt0006	\N
383
\N	lfe0001	\N
384
\N	lfe0002	\N
385
\N	lfe0003	\N
386
\N	lfe0004	\N
387
\N	gfwle0001	\N
388
\N	gfwle0002	\N
389
\N	gfwle0003	\N
390
\N	gfwle0004	\N
391
\N	lfra0001	\N
392
\N	lfra0002	\N
393
\N	lfra0003	\N
394
\N	lfra0004	\N
395
\N	lfra0005	\N
396
\N	lfra0006	\N
397
\N	lfra0007	\N
398
\N	lfra0008	\N
399
\N	lfra0009	\N
400
\N	lfra0010	\N
401
\N	gfwlra0001	\N
402
\N	gfwlra0002	\N
403
\N	gfwlra0003	\N
404
\N	gfwlra0004	\N
405
\N	gfwlra0005	\N
406
\N	gfwlra0006	\N
407
\N	gfwlra0007	\N
408
\N	gfwlra0008	\N
409
\N	gfwlra0009	\N
410
\N	gfwlra0010	\N
411
\N	lfrs0001	\N
412
\N	lfrs0002	\N
413
\N	lfrs0003	\N
414
\N	lfrs0004	\N
415
\N	lfrs0005	\N
416
\N	lfrs0006	\N
417
\N	lfrs0007	\N
418
\N	lfrs0008	\N
419
\N	lfrs0009	\N
420
\N	lfrs0010	\N
421
\N	gfwlrs0001	\N
422
\N	gfwlrs0002	\N
423
\N	gfwlrs0003	\N
424
\N	gfwlrs0004	\N
425
\N	gfwlrs0005	\N
426
\N	gfwlrs0006	\N
427
\N	gfwlrs0007	\N
428
\N	gfwlrs0008	\N
429
\N	gfwlrs0009	\N
430
\N	gfwlrs0010	\N
431
\.
432

433
UPDATE "Locks" SET "boundedBy" = ST_GeometryFromText('POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))', 32615) WHERE TRUE;
434
UPDATE "Locks" SET "pointProperty" = ST_GeometryFromText('POINT(500050 500050)', 32615) WHERE TRUE;
435

436
--
437
-- Data for TOC Entry ID 71 (OID 312570)
438
--
439
-- Name: OtherFeature Type: TABLE DATA Owner: public
440
--
441

442

443
COPY "Other" FROM stdin;
444
A Single Feature used to test returning of properties	singleFeature	SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))	SRID=32615;POINT(500050 500050)	always	sometimes	7	2002-12-02
445
\.
446

447
--
448
-- Fixes to have primary keys and no oids
449
--
450
alter table "Deletes" add column pkey serial;
451
alter table "Deletes" add primary key (pkey);
452
alter table "Deletes" set without oids;
453

454
alter table "Fifteen" add column pkey serial;
455
alter table "Fifteen" add primary key (pkey);
456
alter table "Fifteen" set without oids;
457

458
alter table "Inserts" add column pkey serial;
459
alter table "Inserts" add primary key (pkey);
460
alter table "Inserts" set without oids;
461

462
alter table "Lines" add column pkey serial;
463
alter table "Lines" add primary key (pkey);
464
alter table "Lines" set without oids;
465

466
alter table "Locks" add column pkey serial;
467
alter table "Locks" add primary key (pkey);
468
alter table "Locks" set without oids;
469

470
alter table "MLines" add column pkey serial;
471
alter table "MLines" add primary key (pkey);
472
alter table "MLines" set without oids;
473

474
alter table "MPoints" add column pkey serial;
475
alter table "MPoints" add primary key (pkey);
476
alter table "MPoints" set without oids;
477

478
alter table "MPolygons" add column pkey serial;
479
alter table "MPolygons" add primary key (pkey);
480
alter table "MPolygons" set without oids;
481

482
alter table "Nulls" add column pkey serial;
483
alter table "Nulls" add primary key (pkey);
484
alter table "Nulls" set without oids;
485

486
alter table "Other" add column pkey serial;
487
alter table "Other" add primary key (pkey);
488
alter table "Other" set without oids;
489

490
alter table "Points" add column pkey serial;
491
alter table "Points" add primary key (pkey);
492
alter table "Points" set without oids;
493

494
alter table "Polygons" add column pkey serial;
495
alter table "Polygons" add primary key (pkey);
496
alter table "Polygons" set without oids;
497

498
alter table "Seven" add column pkey serial;
499
alter table "Seven" add primary key (pkey);
500
alter table "Seven" set without oids;
501

502
alter table "Updates" add column pkey serial;
503
alter table "Updates" add primary key (pkey);
504
alter table "Updates" set without oids;
505

506

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.