source: trunk/data/konvert/postnas_0.5/alkis_gemarkungen_schema.sql @ 163

Revision 87, 1.0 KB checked in by astrid.emde, 11 years ago (diff)

Erstellt Tabellen zur Anzeige der Gemarkungen / GEmeinden

Line 
1CREATE TABLE gemarkungen (
2  ogc_fid serial NOT NULL,
3  land                  integer,
4  regierungsbezirk      integer,
5  kreis                 integer,
6  gemeinde              integer,
7  gemarkung             integer NOT NULL,
8  gemeindename          character varying(80),
9  gemarkungsname        character varying(80),
10  gkz                   character varying(3),
11  CONSTRAINT gemarkungen_pk PRIMARY KEY (ogc_fid)
12);
13
14SELECT AddGeometryColumn('gemarkungen','wkb_geometry','25832','POLYGON',2);
15
16CREATE INDEX gemarkungen_geom_idx ON gemarkungen USING gist (wkb_geometry);
17
18INSERT INTO gemeinde (wkb_geometry,gemeinde)
19SELECT union(wkb_geometry),gemeinde from from ax_flurstuecke group by gemeinde;
20
21
22---------------------------
23CREATE TABLE gemeinden (
24  ogc_fid serial NOT NULL,
25  land                  integer,
26  regierungsbezirk      integer,
27  kreis                 integer,
28  gemeinde              integer,
29  gemeindename          character varying(80),
30  gkz                   character varying(3),
31  CONSTRAINT gemeinden_pk PRIMARY KEY (ogc_fid)
32);
33
34SELECT AddGeometryColumn('gemeinden','wkb_geometry','25832','POLYGON',2);
35
36CREATE INDEX gemeinden_geom_idx ON gemeinden USING gist (wkb_geometry);
Note: See TracBrowser for help on using the repository browser.