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

Revision 87, 571 bytes checked in by astrid.emde, 11 years ago (diff)

Erstellt Tabellen zur Anzeige der Gemarkungen / GEmeinden

Line 
1---------------------------
2CREATE TABLE gemeinden (
3  ogc_fid serial NOT NULL,
4  land                  integer,
5  regierungsbezirk      integer,
6  kreis                 integer,
7  gemeinde              integer,
8  gemeindename          character varying(80),
9  gkz                   character varying(3),
10  CONSTRAINT gemeinden_pk PRIMARY KEY (ogc_fid)
11);
12
13SELECT AddGeometryColumn('gemeinden','wkb_geometry','25832','POLYGON',2);
14
15CREATE INDEX gemeinden_geom_idx ON gemeinden USING gist (wkb_geometry);
16
17
18INSERT INTO gemeinde (wkb_geometry,gemeinde)
19SELECT union(wkb_geometry),gemeinde from from ax_flurstuecke group by gemeinde;
20
Note: See TracBrowser for help on using the repository browser.