geoserver
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
16create extension postgis;
17
18
19--uncomment these if you want to reset everything.
20drop table "Nulls";
21drop table "Points";
22drop table "Other";
23drop table "Lines";
24drop table "Polygons";
25drop table "MLines";
26drop table "MPolygons";
27drop table "MPoints";
28drop table "Seven";
29drop table "Fifteen";
30drop table "Updates";
31drop table "Inserts";
32drop table "Deletes";
33drop table "Locks";
34delete 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
45CREATE 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
57CREATE 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
72CREATE 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
84CREATE 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
97CREATE 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
109CREATE 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
120CREATE 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
131CREATE 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
142CREATE 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
153CREATE 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
164CREATE 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
175CREATE 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
186CREATE 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
198CREATE 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
218COPY "Seven" FROM stdin;
219SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
220SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
221SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
222SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
223SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
224SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
225SRID=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
234COPY "Nulls" FROM stdin;
235nullFeature \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
244COPY "Deletes" FROM stdin;
245SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) td0001 SRID=32615;POINT(500050 500050)
246SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) td0002 SRID=32615;POINT(500050 500050)
247SRID=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
256COPY "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
265COPY "Updates" FROM stdin;
266SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) tu0001 SRID=32615;POINT(500050 500050)
267SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) tu0002 SRID=32615;POINT(500050 500050)
268SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) tu0003 SRID=32615;POINT(500050 500050)
269SRID=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
278COPY "Points" FROM stdin;
279t0000 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
288COPY "Lines" FROM stdin;
289t0001 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
298COPY "Polygons" FROM stdin;
299t0002 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
308COPY "MPoints" FROM stdin;
309t0003 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
318COPY "MLines" FROM stdin;
319t0004 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
328COPY "MPolygons" FROM stdin;
329t0005 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
338COPY "Fifteen" FROM stdin;
339SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
340SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
341SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
342SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
343SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
344SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
345SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
346SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
347SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
348SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
349SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
350SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
351SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
352SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
353SRID=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
362COPY "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
433UPDATE "Locks" SET "boundedBy" = ST_GeometryFromText('POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))', 32615) WHERE TRUE;
434UPDATE "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
443COPY "Other" FROM stdin;
444A 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--
450alter table "Deletes" add column pkey serial;
451alter table "Deletes" add primary key (pkey);
452alter table "Deletes" set without oids;
453
454alter table "Fifteen" add column pkey serial;
455alter table "Fifteen" add primary key (pkey);
456alter table "Fifteen" set without oids;
457
458alter table "Inserts" add column pkey serial;
459alter table "Inserts" add primary key (pkey);
460alter table "Inserts" set without oids;
461
462alter table "Lines" add column pkey serial;
463alter table "Lines" add primary key (pkey);
464alter table "Lines" set without oids;
465
466alter table "Locks" add column pkey serial;
467alter table "Locks" add primary key (pkey);
468alter table "Locks" set without oids;
469
470alter table "MLines" add column pkey serial;
471alter table "MLines" add primary key (pkey);
472alter table "MLines" set without oids;
473
474alter table "MPoints" add column pkey serial;
475alter table "MPoints" add primary key (pkey);
476alter table "MPoints" set without oids;
477
478alter table "MPolygons" add column pkey serial;
479alter table "MPolygons" add primary key (pkey);
480alter table "MPolygons" set without oids;
481
482alter table "Nulls" add column pkey serial;
483alter table "Nulls" add primary key (pkey);
484alter table "Nulls" set without oids;
485
486alter table "Other" add column pkey serial;
487alter table "Other" add primary key (pkey);
488alter table "Other" set without oids;
489
490alter table "Points" add column pkey serial;
491alter table "Points" add primary key (pkey);
492alter table "Points" set without oids;
493
494alter table "Polygons" add column pkey serial;
495alter table "Polygons" add primary key (pkey);
496alter table "Polygons" set without oids;
497
498alter table "Seven" add column pkey serial;
499alter table "Seven" add primary key (pkey);
500alter table "Seven" set without oids;
501
502alter table "Updates" add column pkey serial;
503alter table "Updates" add primary key (pkey);
504alter table "Updates" set without oids;
505
506