geoserver
601 строка · 18.1 Кб
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
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,
47"pointProperty" geometry,
48CHECK ((srid("pointProperty") = 32615)),
49CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
50CHECK ((srid("boundedBy") = 32615)),
51CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
52) WITH OIDS;
53
54
55--
56-- TOC Entry ID 24 (OID 312275)
57--
58-- Name: NullFeature Type: TABLE Owner: cite
59--
60
61CREATE TABLE "Nulls" (
62"description" character varying,
63"name" character varying,
64"boundedBy" geometry,
65"integers" integer,
66"dates" date,
67"pointProperty" geometry,
68CHECK ((srid("pointProperty") = 32615)),
69CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
70CHECK ((srid("boundedBy") = 32615)),
71CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
72) WITH OIDS;
73
74--
75-- TOC Entry ID 25 (OID 312300)
76--
77-- Name: DeleteFeature Type: TABLE Owner: cite
78--
79
80CREATE TABLE "Deletes" (
81"boundedBy" geometry,
82"id" character varying,
83"pointProperty" geometry,
84CHECK ((srid("pointProperty") = 32615)),
85CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
86CHECK ((srid("boundedBy") = 32615)),
87CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
88
89) WITH OIDS;
90
91--
92-- TOC Entry ID 26 (OID 312305)
93--
94-- Name: InsertFeature Type: TABLE Owner: cite
95--
96
97CREATE TABLE "Inserts" (
98"boundedBy" geometry,
99"id" character varying,
100"pointProperty" geometry,
101CHECK ((srid("pointProperty") = 32615)),
102CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
103CHECK ((srid("boundedBy") = 32615)),
104CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
105) WITH OIDS;
106
107
108--
109-- TOC Entry ID 27 (OID 312310)
110--
111-- Name: UpdateFeature Type: TABLE Owner: cite
112--
113
114CREATE TABLE "Updates" (
115"boundedBy" geometry,
116"id" character varying,
117"pointProperty" geometry,
118CHECK ((srid("pointProperty") = 32615)),
119CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
120CHECK ((srid("boundedBy") = 32615)),
121CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
122) WITH OIDS;
123
124--
125-- TOC Entry ID 28 (OID 312315)
126--
127-- Name: PointFeature Type: TABLE Owner: cite
128--
129
130CREATE TABLE "Points" (
131"id" character varying,
132"pointProperty" geometry,
133CHECK ((srid("pointProperty") = 32615)),
134CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL)))
135) WITH OIDS;
136
137--
138-- TOC Entry ID 29 (OID 312322)
139--
140-- Name: LineStringFeature Type: TABLE Owner: cite
141--
142
143CREATE TABLE "Lines" (
144"id" character varying,
145"lineStringProperty" geometry,
146CHECK ((srid("lineStringProperty") = 32615)),
147CHECK (((geometrytype("lineStringProperty") = 'LINESTRING'::text) OR ("lineStringProperty" IS NULL)))
148) WITH OIDS;
149
150--
151-- TOC Entry ID 30 (OID 312329)
152--
153-- Name: PolygonFeature Type: TABLE Owner: cite
154--
155
156CREATE TABLE "Polygons" (
157"id" character varying,
158"polygonProperty" geometry,
159CHECK ((srid("polygonProperty") = 32615)),
160CHECK (((geometrytype("polygonProperty") = 'POLYGON'::text) OR ("polygonProperty" IS NULL)))
161) WITH OIDS;
162
163--
164-- TOC Entry ID 31 (OID 312335)
165--
166-- Name: MultiPointFeature Type: TABLE Owner: cite
167--
168
169CREATE TABLE "MPoints" (
170"id" character varying,
171"multiPointProperty" geometry,
172CHECK ((srid("multiPointProperty") = 32615)),
173CHECK (((geometrytype("multiPointProperty") = 'MULTIPOINT'::text) OR ("multiPointProperty" IS NULL)))
174) WITH OIDS;
175
176--
177-- TOC Entry ID 32 (OID 312341)
178--
179-- Name: MultiLineStringFeature Type: TABLE Owner: cite
180--
181
182CREATE TABLE "MLines" (
183"id" character varying,
184"multiLineStringProperty" geometry,
185CHECK ((srid("multiLineStringProperty") = 32615)),
186CHECK (((geometrytype("multiLineStringProperty") = 'MULTILINESTRING'::text) OR ("multiLineStringProperty" IS NULL)))
187) WITH OIDS;
188
189--
190-- TOC Entry ID 33 (OID 312348)
191--
192-- Name: MultiPolygonFeature Type: TABLE Owner: cite
193--
194
195CREATE TABLE "MPolygons" (
196"id" character varying,
197"multiPolygonProperty" geometry,
198CHECK ((srid("multiPolygonProperty") = 32615)),
199CHECK (((geometrytype("multiPolygonProperty") = 'MULTIPOLYGON'::text) OR ("multiPolygonProperty" IS NULL)))
200) WITH OIDS;
201
202--
203-- TOC Entry ID 34 (OID 312391)
204--
205-- Name: FifteenFeature Type: TABLE Owner: cite
206--
207
208CREATE TABLE "Fifteen" (
209"boundedBy" geometry,
210"pointProperty" geometry,
211CHECK ((srid("pointProperty") = 32615)),
212CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
213CHECK ((srid("boundedBy") = 32615)),
214CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
215) WITH OIDS;
216
217--
218-- TOC Entry ID 35 (OID 312430)
219--
220-- Name: LockFeature Type: TABLE Owner: cite
221--
222
223CREATE TABLE "Locks" (
224"boundedBy" geometry,
225"id" character varying,
226"pointProperty" geometry,
227CHECK ((srid("pointProperty") = 32615)),
228CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
229CHECK ((srid("boundedBy") = 32615)),
230CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
231) WITH OIDS;
232
233--
234-- TOC Entry ID 36 (OID 312570)
235--
236-- Name: OtherFeature Type: TABLE Owner: cite
237--
238
239CREATE TABLE "Other" (
240"description" character varying,
241"name" character varying,
242"boundedBy" geometry,
243"pointProperty" geometry,
244"string1" character varying NOT NULL,
245"string2" character varying,
246"integers" integer,
247"dates" date,
248CHECK ((srid("pointProperty") = 32615)),
249CHECK (((geometrytype("pointProperty") = 'POINT'::text) OR ("pointProperty" IS NULL))),
250CHECK ((srid("boundedBy") = 32615)),
251CHECK (((geometrytype("boundedBy") = 'POLYGON'::text) OR ("boundedBy" IS NULL)))
252) WITH OIDS;
253
254--
255-- Data for TOC Entry ID 37 (OID 16560)
256--
257-- Name: spatial_ref_sys Type: TABLE DATA Owner: cite
258--
259
260--uncomment this line if cite user has not yet been created.
261--create user cite;
262
263--uncomment these to grant permissions to cite. These occur here
264-- as the tables need to be created before granting privelages.
265--GRANT ALL ON "Nulls" TO cite;
266--GRANT ALL ON "Points" TO cite;
267--GRANT ALL ON "Other" TO cite;
268--GRANT ALL ON "Lines" TO cite;
269--GRANT ALL ON "Polygons" TO cite;
270--GRANT ALL ON "MLines" TO cite;
271--GRANT ALL ON "MPolygons" TO cite;
272--GRANT ALL ON "MPoints" TO cite;
273--GRANT ALL ON "Seven" TO cite;
274--GRANT ALL ON "Fifteen" TO cite;
275--GRANT ALL ON "Updates" TO cite;
276--GRANT ALL ON "Deletes" TO cite;
277--GRANT ALL ON "Inserts" TO cite;
278--GRANT ALL ON "Locks" TO cite;
279--GRANT ALL ON "geometry_columns" TO cite;
280
281
282COPY "geometry_columns" FROM stdin;
283public Nulls pointProperty 2 32615 POINT
284public Nulls boundedBy 2 32615 POLYGON
285public Points pointProperty 2 32615 POINT
286public Other pointProperty 2 32615 POINT
287public Lines lineStringProperty 2 32615 LINESTRING
288public Polygons polygonProperty 2 32615 POLYGON
289public MPolygons multiPolygonProperty 2 32615 MULTIPOLYGON
290public MPoints multiPointProperty 2 32615 MULTIPOINT
291public MLines multiLineStringProperty 2 32615 MULTILINESTRING
292public Other boundedBy 2 32615 POLYGON
293public Seven pointProperty 2 32615 POINT
294public Seven boundedBy 2 32615 POLYGON
295public Fifteen pointProperty 2 32615 POINT
296public Fifteen boundedBy 2 32615 POLYGON
297public Updates pointProperty 2 32615 POINT
298public Updates boundedBy 2 32615 POLYGON
299public Inserts pointProperty 2 32615 POINT
300public Inserts boundedBy 2 32615 POLYGON
301public Deletes pointProperty 2 32615 POINT
302public Deletes boundedBy 2 32615 POLYGON
303public Locks pointProperty 2 32615 POINT
304public Locks boundedBy 2 32615 POLYGON
305\.
306--
307-- Data for TOC Entry ID 39 (OID 113496)
308--
309-- Name: county Type: TABLE DATA Owner: public
310--
311
312
313
314
315COPY "Seven" FROM stdin;
316SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
317SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
318SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
319SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
320SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
321SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
322SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
323\.
324--
325-- Data for TOC Entry ID 59 (OID 312275)
326--
327-- Name: NullFeature Type: TABLE DATA Owner: public
328--
329
330
331COPY "Nulls" FROM stdin;
332nullFeature \N SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) \N \N \N
333\.
334--
335-- Data for TOC Entry ID 60 (OID 312300)
336--
337-- Name: DeleteFeature Type: TABLE DATA Owner: public
338--
339
340
341COPY "Deletes" FROM stdin;
342SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) td0001 SRID=32615;POINT(500050 500050)
343SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) td0002 SRID=32615;POINT(500050 500050)
344SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) td0003 SRID=32615;POINT(500050 500050)
345\.
346--
347-- Data for TOC Entry ID 61 (OID 312305)
348--
349-- Name: InsertFeature Type: TABLE DATA Owner: public
350--
351
352
353COPY "Inserts" FROM stdin;
354\.
355--
356-- Data for TOC Entry ID 62 (OID 312310)
357--
358-- Name: UpdateFeature Type: TABLE DATA Owner: public
359--
360
361
362COPY "Updates" FROM stdin;
363SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) tu0001 SRID=32615;POINT(500050 500050)
364SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) tu0002 SRID=32615;POINT(500050 500050)
365SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) tu0003 SRID=32615;POINT(500050 500050)
366SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) tu0004 SRID=32615;POINT(500050 500050)
367\.
368--
369-- Data for TOC Entry ID 63 (OID 312315)
370--
371-- Name: PointFeature Type: TABLE DATA Owner: public
372--
373
374
375COPY "Points" FROM stdin;
376t0000 SRID=32615;POINT(500050 500050)
377\.
378--
379-- Data for TOC Entry ID 64 (OID 312322)
380--
381-- Name: LineStringFeature Type: TABLE DATA Owner: public
382--
383
384
385COPY "Lines" FROM stdin;
386t0001 SRID=32615;LINESTRING(500125 500025,500175 500075)
387\.
388--
389-- Data for TOC Entry ID 65 (OID 312329)
390--
391-- Name: PolygonFeature Type: TABLE DATA Owner: public
392--
393
394
395COPY "Polygons" FROM stdin;
396t0002 SRID=32615;POLYGON((500225 500025,500225 500075,500275 500050,500275 500025,500225 500025))
397\.
398--
399-- Data for TOC Entry ID 66 (OID 312335)
400--
401-- Name: MultiPointFeature Type: TABLE DATA Owner: public
402--
403
404
405COPY "MPoints" FROM stdin;
406t0003 SRID=32615;MULTIPOINT(500325 500025,500375 500075)
407\.
408--
409-- Data for TOC Entry ID 67 (OID 312341)
410--
411-- Name: MultiLineStringFeature Type: TABLE DATA Owner: public
412--
413
414
415COPY "MLines" FROM stdin;
416t0004 SRID=32615;MULTILINESTRING((500425 500025,500475 500075),(500425 500075,500475 500025))
417\.
418--
419-- Data for TOC Entry ID 68 (OID 312348)
420--
421-- Name: MultiPolygonFeature Type: TABLE DATA Owner: public
422--
423
424
425COPY "MPolygons" FROM stdin;
426t0005 SRID=32615;MULTIPOLYGON(((500525 500025,500550 500050,500575 500025,500525 500025)),((500525 500050,500525 500075,500550 500075,500550 500050,500525 500050)))
427\.
428--
429-- Data for TOC Entry ID 69 (OID 312391)
430--
431-- Name: FifteenFeature Type: TABLE DATA Owner: public
432--
433
434
435COPY "Fifteen" FROM stdin;
436SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
437SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
438SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
439SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
440SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
441SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
442SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
443SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
444SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
445SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
446SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
447SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
448SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
449SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
450SRID=32615;POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000)) SRID=32615;POINT(500050 500050)
451\.
452--
453-- Data for TOC Entry ID 70 (OID 312430)
454--
455-- Name: LockFeature Type: TABLE DATA Owner: public
456--
457
458
459COPY "Locks" FROM stdin;
460\N lfla0001 \N
461\N lfla0002 \N
462\N lfla0003 \N
463\N lfla0004 \N
464\N gfwlla0001 \N
465\N gfwlla0002 \N
466\N gfwlla0003 \N
467\N gfwlla0004 \N
468\N lfbt0001 \N
469\N lfbt0002 \N
470\N lfbt0003 \N
471\N lfbt0004 \N
472\N lfbt0005 \N
473\N lfbt0006 \N
474\N gfwlbt0001 \N
475\N gfwlbt0002 \N
476\N gfwlbt0003 \N
477\N gfwlbt0004 \N
478\N gfwlbt0005 \N
479\N gfwlbt0006 \N
480\N lfe0001 \N
481\N lfe0002 \N
482\N lfe0003 \N
483\N lfe0004 \N
484\N gfwle0001 \N
485\N gfwle0002 \N
486\N gfwle0003 \N
487\N gfwle0004 \N
488\N lfra0001 \N
489\N lfra0002 \N
490\N lfra0003 \N
491\N lfra0004 \N
492\N lfra0005 \N
493\N lfra0006 \N
494\N lfra0007 \N
495\N lfra0008 \N
496\N lfra0009 \N
497\N lfra0010 \N
498\N gfwlra0001 \N
499\N gfwlra0002 \N
500\N gfwlra0003 \N
501\N gfwlra0004 \N
502\N gfwlra0005 \N
503\N gfwlra0006 \N
504\N gfwlra0007 \N
505\N gfwlra0008 \N
506\N gfwlra0009 \N
507\N gfwlra0010 \N
508\N lfrs0001 \N
509\N lfrs0002 \N
510\N lfrs0003 \N
511\N lfrs0004 \N
512\N lfrs0005 \N
513\N lfrs0006 \N
514\N lfrs0007 \N
515\N lfrs0008 \N
516\N lfrs0009 \N
517\N lfrs0010 \N
518\N gfwlrs0001 \N
519\N gfwlrs0002 \N
520\N gfwlrs0003 \N
521\N gfwlrs0004 \N
522\N gfwlrs0005 \N
523\N gfwlrs0006 \N
524\N gfwlrs0007 \N
525\N gfwlrs0008 \N
526\N gfwlrs0009 \N
527\N gfwlrs0010 \N
528\.
529
530UPDATE "Locks" SET "boundedBy" = GeometryFromText('POLYGON((500000 500000,500000 500100,500100 500100,500100 500000,500000 500000))', 32615) WHERE TRUE;
531UPDATE "Locks" SET "pointProperty" = GeometryFromText('POINT(500050 500050)', 32615) WHERE TRUE;
532
533--
534-- Data for TOC Entry ID 71 (OID 312570)
535--
536-- Name: OtherFeature Type: TABLE DATA Owner: public
537--
538
539
540COPY "Other" FROM stdin;
541A 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
542\.
543
544--
545-- Fixes to have primary keys and no oids
546--
547alter table "Deletes" add column pkey serial;
548alter table "Deletes" add primary key (pkey);
549alter table "Deletes" set without oids;
550
551alter table "Fifteen" add column pkey serial;
552alter table "Fifteen" add primary key (pkey);
553alter table "Fifteen" set without oids;
554
555alter table "Inserts" add column pkey serial;
556alter table "Inserts" add primary key (pkey);
557alter table "Inserts" set without oids;
558
559alter table "Lines" add column pkey serial;
560alter table "Lines" add primary key (pkey);
561alter table "Lines" set without oids;
562
563alter table "Locks" add column pkey serial;
564alter table "Locks" add primary key (pkey);
565alter table "Locks" set without oids;
566
567alter table "MLines" add column pkey serial;
568alter table "MLines" add primary key (pkey);
569alter table "MLines" set without oids;
570
571alter table "MPoints" add column pkey serial;
572alter table "MPoints" add primary key (pkey);
573alter table "MPoints" set without oids;
574
575alter table "MPolygons" add column pkey serial;
576alter table "MPolygons" add primary key (pkey);
577alter table "MPolygons" set without oids;
578
579alter table "Nulls" add column pkey serial;
580alter table "Nulls" add primary key (pkey);
581alter table "Nulls" set without oids;
582
583alter table "Other" add column pkey serial;
584alter table "Other" add primary key (pkey);
585alter table "Other" set without oids;
586
587alter table "Points" add column pkey serial;
588alter table "Points" add primary key (pkey);
589alter table "Points" set without oids;
590
591alter table "Polygons" add column pkey serial;
592alter table "Polygons" add primary key (pkey);
593alter table "Polygons" set without oids;
594
595alter table "Seven" add column pkey serial;
596alter table "Seven" add primary key (pkey);
597alter table "Seven" set without oids;
598
599alter table "Updates" add column pkey serial;
600alter table "Updates" add primary key (pkey);
601alter table "Updates" set without oids;
602
603