GLE-Layer-Reichsbodenschätzung

Aus kvwmap
Version vom 3. August 2015, 15:24 Uhr von Markus Hentschel (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Layer Bodenschätzung für die klassifizierte Darstellung der Schätzungsflächen

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_Bodenschätzung','Bodenschätzung','2',@group_id,'SELECT * FROM ax_bodenschaetzung WHERE CASE WHEN \'$hist_timestamp\' = \'\' THEN endet IS NULL ELSE beginnt <= \'$hist_timestamp\' AND (\'$hist_timestamp\' <= endet or endet IS NULL) END','ax_bodenschaetzung','wkb_geometry from (SELECT a.oid,  c.kurz||d.kurz AS label, b.kurz, a.wkb_geometry FROM alkis.ax_bodenschaetzung AS a INNER JOIN alkis.ax_bodenschaetzung_kulturart AS b ON a.kulturart=b.wert INNER JOIN alkis.ax_bodenschaetzung_bodenart AS c ON a.bodenart=c.wert INNER JOIN alkis.ax_bodenschaetzung_zustandsstufe AS d ON a.zustandsstufeoderbodenstufe = d.wert WHERE (CASE WHEN \'$hist_timestamp\' = \'\' THEN a.endet IS NULL ELSE a.beginnt <= \'$hist_timestamp\' AND (\'$hist_timestamp\' <= a.endet or a.endet IS NULL) 
 END)) as foo using unique oid using srid=25833','alkis',,,,,'label','5001','49',,@connection,,'6',,'oid','3','pixels','25833',,'1','50','94000','50','5000',,'EPSG:25833',,'1.1.0','image/png','60',,,,,'1','0',,'Reichsbodenschätzung aus ALKIS','Fachdienst Kataster und Vermessung',,'0');
SET @last_layer_id50303347=LAST_INSERT_ID();
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'ackerzahlodergruenlandzahl','ackerzahlodergruenlandzahl','ax_bodenschaetzung','ax_bodenschaetzung','int4',,,'1','32',NULL,,'Text',,'Ackerzahl oder Grünlandzahl',,,,,,,NULL,NULL,'15','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'advstandardmodell','advstandardmodell','ax_bodenschaetzung','ax_bodenschaetzung','_varchar',,,'1',NULL,NULL,,'Text',,'ADV Standardmodell',,,,,,,NULL,NULL,'5','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'anlass','anlass','ax_bodenschaetzung','ax_bodenschaetzung','varchar',,,'1',NULL,NULL,,'Text',,'Anlass',,,,,,,NULL,NULL,'7','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'art','art','ax_bodenschaetzung','ax_bodenschaetzung','varchar',,,'1',NULL,NULL,,'Text',,'Art',,,,,,,NULL,NULL,'8','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'beginnt','beginnt','ax_bodenschaetzung','ax_bodenschaetzung','bpchar',,'UNIQUE','1','20',NULL,,'Text',,,,,,,,,NULL,NULL,'3','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'bodenart','bodenart','ax_bodenschaetzung','ax_bodenschaetzung','int4',,,'1','32',NULL,,'Text',,'Bodenart',,,,,,,NULL,NULL,'11','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'bodenzahlodergruenlandgrundzahl','bodenzahlodergruenlandgrundzahl','ax_bodenschaetzung','ax_bodenschaetzung','int4',,,'1','32',NULL,,'Text',,'Bodenzahl oder Grünlandgrundzahl',,,,,,,NULL,NULL,'14','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'endet','endet','ax_bodenschaetzung','ax_bodenschaetzung','bpchar',,,'1','20',NULL,,'Text',,,,,,,,,NULL,NULL,'4','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'entstehungsartoderklimastufewasserverhaeltnisse','entstehungsartoderklimastufewasserverhaeltnisse','ax_bodenschaetzung','ax_bodenschaetzung','_int4',,,'1',NULL,NULL,,'Text',,'Entstehungsart/Klimastufe Wasserverhältnisse',,,,,,,NULL,NULL,'13','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'gml_id','gml_id','ax_bodenschaetzung','ax_bodenschaetzung','varchar',,'UNIQUE','0','16',NULL,,'Text',,,,,,,,,NULL,NULL,'1','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'identifier','identifier','ax_bodenschaetzung','ax_bodenschaetzung','varchar',,,'1',NULL,NULL,,'Text',,,,,,,,,NULL,NULL,'2','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'jahreszahl','jahreszahl','ax_bodenschaetzung','ax_bodenschaetzung','int4',,,'1','32',NULL,,'Text',,'Jahreszahl',,,,,,,NULL,NULL,'17','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'kulturart','kulturart','ax_bodenschaetzung','ax_bodenschaetzung','int4',,,'1','32',NULL,,'Text',,'Kulturart',,,,,,,NULL,NULL,'10','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'name','name','ax_bodenschaetzung','ax_bodenschaetzung','varchar',,,'1',NULL,NULL,,'Text',,'Name',,,,,,,NULL,NULL,'9','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'ogc_fid','ogc_fid','ax_bodenschaetzung','ax_bodenschaetzung','int4',,'PRIMARY KEY','1','32',NULL,,'Text',,,,,,,,,NULL,NULL,'0','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'sonstigeangaben','sonstigeangaben','ax_bodenschaetzung','ax_bodenschaetzung','_int4',,,'1',NULL,NULL,,'Text',,'sonstige Angaben',,,,,,,NULL,NULL,'16','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'sonstigesmodell','sonstigesmodell','ax_bodenschaetzung','ax_bodenschaetzung','_varchar',,,'1',NULL,NULL,,'Text',,'sonstiges Modell',,,,,,,NULL,NULL,'6','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'wkb_geometry','wkb_geometry','ax_bodenschaetzung','ax_bodenschaetzung','geometry','POLYGON',,'1',NULL,NULL,,'Geometrie',,,,,,,,,NULL,NULL,'18','0','0');
INSERT INTO layer_attributes (`layer_id`,`name`,`real_name`,`tablename`,`table_alias_name`,`type`,`geometrytype`,`constraints`,`nullable`,`length`,`decimal_length`,`default`,`form_element_type`,`options`,`alias`,`alias_low-german`,`alias_english`,`alias_polish`,`alias_vietnamese`,`tooltip`,`group`,`raster_visibility`,`mandatory`,`order`,`privileg`,`query_tooltip`) VALUES(@last_layer_id50303347,'zustandsstufeoderbodenstufe','zustandsstufeoderbodenstufe','ax_bodenschaetzung','ax_bodenschaetzung','int4',,,'1','32',NULL,,'Text',,'Zustands-/Bodenstufe',,,,,,,NULL,NULL,'12','0','0');
INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('Ackerland',@last_layer_id50303347,'(\'[kurz]\' = \'A\')','1',);
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,,'3','205 116 40',,'-1 -1 -1',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 styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,,,'-1 -1 -1',,'0 98 3',NULL,NULL,,,NULL,'3','4','5',);
SET @last_style_id=LAST_INSERT_ID();
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);
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('verdana',NULL,'89 39 0','255 255 255',,NULL,NULL,,,NULL,NULL,'8','6','10',NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'1','126','1');
SET @last_label_id=LAST_INSERT_ID();
INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);
INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('Acker-Grünland',@last_layer_id50303347,'(\'[kurz]\' = \'AGr\')','2',);
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,,'3','231 168 0',,'-1 -1 -1',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 styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,,,'-1 -1 -1',,'0 98 3',NULL,NULL,,,NULL,'3','4','5',);
SET @last_style_id=LAST_INSERT_ID();
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);
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('verdana',NULL,'89 39 0','255 255 255',,NULL,NULL,,,NULL,NULL,'8','6','10',NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'1','126','1');
SET @last_label_id=LAST_INSERT_ID();
INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);
INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('Grünland',@last_layer_id50303347,'(\'[kurz]\' = \'Gr\')','3',);
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,,'3','143 249 44',,'-1 -1 -1',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 styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,,,'-1 -1 -1',,'0 98 3',NULL,NULL,,,NULL,'3','4','5',);
SET @last_style_id=LAST_INSERT_ID();
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);
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('verdana',NULL,'0 59 31','255 255 255',,NULL,NULL,,,NULL,NULL,'8','6','10',NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'1','126','1');
SET @last_label_id=LAST_INSERT_ID();
INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);
INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('Grünland-Acker',@last_layer_id50303347,'(\'[kurz]\' = \'GrA\')','4',);
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,,'3','22 154 0',,'-1 -1 -1',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 styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,,,'-1 -1 -1',,'0 98 3',NULL,NULL,,,NULL,'3','4','5',);
SET @last_style_id=LAST_INSERT_ID();
INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);
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('verdana',NULL,'0 59 31','255 255 255',,NULL,NULL,,,NULL,NULL,'8','6','10',NULL,NULL,NULL,NULL,NULL,NULL,'1',NULL,NULL,'1','126','1');
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, '50303347', @last_layer_id50303347) WHERE layer_id IN(@last_layer_id50303347) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK', 'Autovervollständigungsfeld', 'Auswahlfeld');