Gruppen und Themen für ALKIS: Gebäude
Aus kvwmap
Version vom 17. März 2015, 14:10 Uhr von Markus Hentschel (Diskussion | Beiträge)
Ursprungsversion, LUP 01.01.2015
SET @group_id = 1; SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp'; INSERT INTO layer (`Name`,`alias`,`Datentyp`,`Gruppe`,`pfad`,`maintable`,`Data`,`schema`,`document_path`,`tileindex`,`tileitem`,`labelangleitem`,`labelitem`,`labelmaxscale`,`labelminscale`,`labelrequires`,`connection`,`printconnection`,`connectiontype`,`classitem`,`filteritem`,`tolerance`,`toleranceunits`,`epsg_code`,`template`,`queryable`,`transparency`,`drawingorder`,`minscale`,`maxscale`,`offsite`,`ows_srs`,`wms_name`,`wms_server_version`,`wms_format`,`wms_connectiontimeout`,`wms_auth_username`,`wms_auth_password`,`wfs_geom`,`selectiontype`,`querymap`,`logconsume`,`processing`,`kurzbeschreibung`,`datenherr`,`metalink`,`privileg`) VALUES('Alkis Gebäude','','2',@group_id,'SELECT * FROM lk_gebaeude WHERE 1=1','lk_gebaeude','the_geom from (select ogc_fid as oid, wkb_geometry as the_geom from alkis.lk_gebaeude) as foo using unique oid using srid=25833','alkis','','','','','',NULL,NULL,'',@connection,'','6','','','3','pixels','25833','','1',NULL,'30000765','1','100000','','EPSG:25833','','1.1.0','image/png','60','','','','','1','0','','Gebäude in ALKIS','Vermessungs- und Geoinformationsbehörde LWL-PCH','','0'); SET @last_layer_id1152=LAST_INSERT_ID(); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'ax_datenerhebung','ax_datenerhebung','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','15','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'bezeichner','bezeichner','lk_gebaeude','lk_gebaeude','varchar','','','1',NULL,'Text','','','','4','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'dachform','dachform','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','12','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'dach_bezeichner','dach_bezeichner','lk_gebaeude','lk_gebaeude','varchar','','','1',NULL,'Text','','','','13','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'gebaeudefunktion','gebaeudefunktion','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','3','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'gebaeudezustand','gebaeudezustand','lk_gebaeude','lk_gebaeude','varchar','','','1',NULL,'Text','','','','9','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'gml_id','gml_id','lk_gebaeude','lk_gebaeude','bpchar','','','1','16','Text','','','','2','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'herkunft','herkunft','lk_gebaeude','lk_gebaeude','varchar','','','1',NULL,'Text','','','','16','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'hochhaus','hochhaus','lk_gebaeude','lk_gebaeude','varchar','','','1',NULL,'Text','','','','14','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'lagezurerdoberflaeche','lagezurerdoberflaeche','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','11','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'name','name','lk_gebaeude','lk_gebaeude','_varchar','','','1',NULL,'Text','','','','5','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'objekthoehe','objekthoehe','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','10','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'ogc_fid','ogc_fid','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','1','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'oid','oid','lk_gebaeude','lk_gebaeude','oid','','','1',NULL,'Text','','','','0','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'weiterefunktion_bezeich','weiterefunktion_bezeich','lk_gebaeude','lk_gebaeude','varchar','','','1',NULL,'Text','','','','7','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'weiterefunktion_wert','weiterefunktion_wert','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','6','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'wkb_geometry','wkb_geometry','lk_gebaeude','lk_gebaeude','geometry','POLYGON','','1',NULL,'Text','','','','17','0'); INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`form_element_type`,`options`,`alias`,`tooltip`,`order`,`privileg`) VALUES(@last_layer_id1152,'zustand','zustand','lk_gebaeude','lk_gebaeude','int4','','','1','32','Text','','','','8','0'); INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('alle',@last_layer_id1152,'','0',''); SET @last_class_id=LAST_INSERT_ID(); INSERT INTO styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,'','1','-1 -1 -1',' ','0 0 0',NULL,NULL,'','',NULL,NULL,NULL,NULL,''); SET @last_style_id=LAST_INSERT_ID(); INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0); INSERT INTO labels (`font`,`type`,`color`,`outlinecolor`,`shadowcolor`,`shadowsizex`,`shadowsizey`,`backgroundcolor`,`backgroundshadowcolor`,`backgroundshadowsizex`,`backgroundshadowsizey`,`size`,`minsize`,`maxsize`,`position`,`offsetx`,`offsety`,`angle`,`autoangle`,`buffer`,`antialias`,`minfeaturesize`,`maxfeaturesize`,`partials`,`wrap`,`the_force`) VALUES('arial',NULL,'240 0 19','255 255 255','',NULL,NULL,'255 255 255','',NULL,NULL,'8','6','10',NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'1',NULL,NULL); SET @last_label_id=LAST_INSERT_ID(); INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id); UPDATE layer_attributes SET options = REPLACE(options, '1152', @last_layer_id1152) WHERE layer_id IN(@last_layer_id1152) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');