source: trunk/data/konvert/postnas_0.6/atkis_rp_rendering/processing/sql/gruenland_prep.sql @ 114

Revision 114, 674 bytes checked in by tobias.dick, 12 years ago (diff)

Initiale Dateien um per PostNAS importierte ATKIS Daten für ein Online Rendering aufzubereiten. Die Scripte erzeugen pro darzustellender Objektart bis zu 6 Generalisierungsstufen. Die Parameter können in den Shellscripten angepasst werden. Die Visualisierung kann z.B. über den Mapserver erfolgen. Der Bildaufbau sollte in jeder Stufe unter einer Sekunde benötigen. Die Laufzeit der Scripte beträgt auf einem single core 2.0GHz Prozessor ca 2.5 Stunden.

Line 
1--
2DROP TABLE IF EXISTS map_gruenland_g0;
3DROP SEQUENCE IF EXISTS map_gruenland_g0_gid_seq;
4--
5SELECT (ST_Dump( ST_Union( ax_landwirtschaft.wkb_geometry ))).geom AS wkb_geometry, vegetationsmerkmal AS widmung
6INTO map_gruenland_g0
7FROM ax_landwirtschaft
8WHERE vegetationsmerkmal = 1020  --
9GROUP BY vegetationsmerkmal;
10--
11CREATE INDEX map_gruenland_g0_gidx ON map_gruenland_g0 USING GIST ( wkb_geometry );
12CREATE SEQUENCE map_gruenland_g0_gid_seq;
13ALTER TABLE map_gruenland_g0 ADD COLUMN gid INTEGER;
14UPDATE map_gruenland_g0 SET gid = nextval('map_gruenland_g0_gid_seq');
15ALTER TABLE map_gruenland_g0 ALTER COLUMN gid SET DEFAULT nextval('map_gruenland_g0_gid_seq');
16--
Note: See TracBrowser for help on using the repository browser.