GLE-Layer-Baumkataster: Unterschied zwischen den Versionen
Aus kvwmap
Rahn (Diskussion | Beiträge) |
(Wenn bearbeiter in postgres not null ist, muss dieser auch in der Layerdefinition von mysql sein, damit der user eingetragen werden kann.) |
||
Zeile 3: | Zeile 3: | ||
SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp'; | SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp'; | ||
+ | # Layer Baumkataster Dokumente | ||
INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Dokumente','5',@group_id,'SELECT kontrollid, dokument FROM kontrollen_docs WHERE (1=1)','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); | INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Dokumente','5',@group_id,'SELECT kontrollid, dokument FROM kontrollen_docs WHERE (1=1)','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); | ||
SET @last_layer_id245=LAST_INSERT_ID(); | SET @last_layer_id245=LAST_INSERT_ID(); | ||
Zeile 8: | Zeile 9: | ||
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`) VALUES(@last_layer_id245,'kontrollid','kontrollid','kontrollen_docs','kontrollen_docs','int4','','','0',NULL,'Text','','Kontroll-ID','','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`) VALUES(@last_layer_id245,'kontrollid','kontrollid','kontrollen_docs','kontrollen_docs','int4','','','0',NULL,'Text','','Kontroll-ID','','0'); | ||
− | INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Grunddaten','0',@group_id,'SELECT baumid, baumnummer, amt, gemeinde, standort, status, baumart, baumart_spezial, sorte, sicherheitserwartung, kontrollintervall, \'anzeigen ->\' AS kontrolle, \'http://www.justiz.nrw.de/nrwe/olgs/koeln/j2010/7_U_31_10urteil20100729.html\' as link_urteil, the_geom FROM grunddaten_baum WHERE (1=1)','the_geom from baumkataster.grunddaten_baum as foo using unique oid using srid=25833','baumkataster','','','','','baumnummer','5001','99','',@connection,'','6','baumid','baumid','10','pixels','25833','','1','100','91000','99','15001','','EPSG:2398','','1.1.0','image/png','60','','','','','1','0'); | + | # Layer Baumkataster Grunddaten |
+ | INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Grunddaten','0',@group_id,'SELECT baumid, baumnummer, amt, gemeinde, standort, status, baumart, baumart_spezial, sorte, sicherheitserwartung, kontrollintervall, \'anzeigen ->\' AS kontrolle, \'http://www.justiz.nrw.de/nrwe/olgs/koeln/j2010/7_U_31_10urteil20100729.html\' as link_urteil, bearbeiter, the_geom FROM grunddaten_baum WHERE (1=1)','the_geom from baumkataster.grunddaten_baum as foo using unique oid using srid=25833','baumkataster','','','','','baumnummer','5001','99','',@connection,'','6','baumid','baumid','10','pixels','25833','','1','100','91000','99','15001','','EPSG:2398','','1.1.0','image/png','60','','','','','1','0'); | ||
SET @last_layer_id242=LAST_INSERT_ID(); | SET @last_layer_id242=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`) VALUES(@last_layer_id242,'amt','amt','grunddaten_baum','grunddaten_baum','varchar','','','1','100','Auswahlfeld','select distinct amt as value, amt as output from gd_gemeinde_amt order by amt <required by>gemeinde</required by>','Amt','','2'); | 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`) VALUES(@last_layer_id242,'amt','amt','grunddaten_baum','grunddaten_baum','varchar','','','1','100','Auswahlfeld','select distinct amt as value, amt as output from gd_gemeinde_amt order by amt <required by>gemeinde</required by>','Amt','','2'); | ||
Zeile 47: | Zeile 49: | ||
INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id); | INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id); | ||
+ | # Layer Baumkataster Kontrolldaten | ||
INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Kontrolldaten','5',@group_id,'SELECT kontrollid, k.baumid, baumnummer, datum, kontrollart, bearbeiter, baumhoehe, kronendurchmesser, stammumfang, alteramstandort, entwicklungsphase, CASE WHEN (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) = 0 THEN \'Kein Eintrag\' WHEN (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) = 1 THEN \'1 Eintrag\' ELSE (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) || \' Einträge\' END AS regelkontrollen, zustand, handlungsbedarf, bemerkung, \'anzeigen\' AS dokument FROM kontrollen k, grunddaten_baum g WHERE g.baumid=k.baumid ORDER BY datum | INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Kontrolldaten','5',@group_id,'SELECT kontrollid, k.baumid, baumnummer, datum, kontrollart, bearbeiter, baumhoehe, kronendurchmesser, stammumfang, alteramstandort, entwicklungsphase, CASE WHEN (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) = 0 THEN \'Kein Eintrag\' WHEN (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) = 1 THEN \'1 Eintrag\' ELSE (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) || \' Einträge\' END AS regelkontrollen, zustand, handlungsbedarf, bemerkung, \'anzeigen\' AS dokument FROM kontrollen k, grunddaten_baum g WHERE g.baumid=k.baumid ORDER BY datum | ||
','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); | ','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); | ||
Zeile 67: | Zeile 70: | ||
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`) VALUES(@last_layer_id243,'zustand','zustand','kontrollen','k','varchar','','','1','50','Auswahlfeld','\'gesund / leicht geschädigt\',\'stark geschädigt\'','Zustand','Allg. Einschätzung des Baumzustandes bez. der Stand- und Bruchsicherheit des Baumes','12'); | 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`) VALUES(@last_layer_id243,'zustand','zustand','kontrollen','k','varchar','','','1','50','Auswahlfeld','\'gesund / leicht geschädigt\',\'stark geschädigt\'','Zustand','Allg. Einschätzung des Baumzustandes bez. der Stand- und Bruchsicherheit des Baumes','12'); | ||
+ | # Layer Baumkataster Kontrolle Handlungsbedarf | ||
INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Kontrolle Handlungsbedarf','5',@group_id,'SELECT kontrollid, \'(\' || kontrollid || \') \' || datum as zurueck, handlungsbedarf, eingehendeuntersuchung, massnahme, massnahmeart, faellung, erledigung FROM kontrollen WHERE (1=1)','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); | INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Kontrolle Handlungsbedarf','5',@group_id,'SELECT kontrollid, \'(\' || kontrollid || \') \' || datum as zurueck, handlungsbedarf, eingehendeuntersuchung, massnahme, massnahmeart, faellung, erledigung FROM kontrollen WHERE (1=1)','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); | ||
SET @last_layer_id246=LAST_INSERT_ID(); | SET @last_layer_id246=LAST_INSERT_ID(); | ||
Zeile 79: | Zeile 83: | ||
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`) VALUES(@last_layer_id246,'zurueck','zurueck','','','text','','',NULL,NULL,'SubFormFK','243,kontrollid;no_new_window','zur Kontrolle','','2'); | 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`) VALUES(@last_layer_id246,'zurueck','zurueck','','','text','','',NULL,NULL,'SubFormFK','243,kontrollid;no_new_window','zur Kontrolle','','2'); | ||
+ | # Layer Baumkataster Regelkontrollen | ||
INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Regelkontrolle','5',@group_id,'SELECT r.kontrollid, \'(\' || r.kontrollid || \') \' || k.datum as zurueck, k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15, bemerkungen_krone, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, bemerkungen_stamm, w1, w2, w3, w4, w5, w6, w7, w8, bemerkungen_stammfuss, wu1, wu2, wu3, bemerkungen_wurzel, v1, v2, v3, v4, v5, v6, bemerkungen_umfeld | INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Regelkontrolle','5',@group_id,'SELECT r.kontrollid, \'(\' || r.kontrollid || \') \' || k.datum as zurueck, k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15, bemerkungen_krone, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, bemerkungen_stamm, w1, w2, w3, w4, w5, w6, w7, w8, bemerkungen_stammfuss, wu1, wu2, wu3, bemerkungen_wurzel, v1, v2, v3, v4, v5, v6, bemerkungen_umfeld | ||
FROM kontrollen k, regelkontrollen r WHERE k.kontrollid=r.kontrollid','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); | FROM kontrollen k, regelkontrollen r WHERE k.kontrollid=r.kontrollid','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); |
Version vom 10. Februar 2014, 10:52 Uhr
SET @group_id = 1; SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp'; # Layer Baumkataster Dokumente INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Dokumente','5',@group_id,'SELECT kontrollid, dokument FROM kontrollen_docs WHERE (1=1)','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); SET @last_layer_id245=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`) VALUES(@last_layer_id245,'dokument','dokument','kontrollen_docs','kontrollen_docs','varchar','','','0','255','Dokument','','Dokument','','1'); 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`) VALUES(@last_layer_id245,'kontrollid','kontrollid','kontrollen_docs','kontrollen_docs','int4','','','0',NULL,'Text','','Kontroll-ID','','0'); # Layer Baumkataster Grunddaten INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Grunddaten','0',@group_id,'SELECT baumid, baumnummer, amt, gemeinde, standort, status, baumart, baumart_spezial, sorte, sicherheitserwartung, kontrollintervall, \'anzeigen ->\' AS kontrolle, \'http://www.justiz.nrw.de/nrwe/olgs/koeln/j2010/7_U_31_10urteil20100729.html\' as link_urteil, bearbeiter, the_geom FROM grunddaten_baum WHERE (1=1)','the_geom from baumkataster.grunddaten_baum as foo using unique oid using srid=25833','baumkataster','','','','','baumnummer','5001','99','',@connection,'','6','baumid','baumid','10','pixels','25833','','1','100','91000','99','15001','','EPSG:2398','','1.1.0','image/png','60','','','','','1','0'); SET @last_layer_id242=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`) VALUES(@last_layer_id242,'amt','amt','grunddaten_baum','grunddaten_baum','varchar','','','1','100','Auswahlfeld','select distinct amt as value, amt as output from gd_gemeinde_amt order by amt <required by>gemeinde</required by>','Amt','','2'); 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`) VALUES(@last_layer_id242,'baumart','baumart','grunddaten_baum','grunddaten_baum','varchar','','','1','255','Auswahlfeld','select bezeichnunglatein as value, bezeichnunglatein||\' - \'||bezeichnung as output from baumkataster.baumarten order by bezeichnunglatein','Baumart','','6'); 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`) VALUES(@last_layer_id242,'baumart_spezial','baumart_spezial','grunddaten_baum','grunddaten_baum','varchar','','','1','255','Text','','Baumart (sonstige)','Falls nicht in der Liste enthalten','7'); 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`) VALUES(@last_layer_id242,'baumid','baumid','grunddaten_baum','grunddaten_baum','int4','','','1',NULL,'Text','','Baum-ID','','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`) VALUES(@last_layer_id242,'baumnummer','baumnummer','grunddaten_baum','grunddaten_baum','int4','','','0',NULL,'Text','','Baum-Nummer','','1'); 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`) VALUES(@last_layer_id242,'gemeinde','gemeinde','grunddaten_baum','grunddaten_baum','varchar','','','1','100','Auswahlfeld','select gemeindename as value, gemeindename as output from public.gd_gemeinde_amt as a where a.amt = <requires>amt</requires> order by gemeindename','Gemeinde','','3'); 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`) VALUES(@last_layer_id242,'kontrolle','kontrolle','','','unknown','','',NULL,NULL,'SubFormEmbeddedPK','243,baumid,datum;no_new_window','Kontrolldaten','','11'); 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`) VALUES(@last_layer_id242,'kontrollintervall','kontrollintervall','grunddaten_baum','grunddaten_baum','varchar','','','0','50','Auswahlfeld','\'halbjährlich\',\'jährlich\',\'alle 2 Jahre\',\'alle 3 Jahre\',\'Überprüfung bei Jungbaumpflege\'','Kontrollintervall','siehe Tabelle 1 im Kapitel 5.3.2.2 der Baumkontrollrichtlinie (2010)','10'); 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`) VALUES(@last_layer_id242,'link_urteil','link_urteil','','','unknown','','',NULL,NULL,'Link','','Rechtliche Grundlagen','','12'); 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`) VALUES(@last_layer_id242,'sicherheitserwartung','sicherheitserwartung','grunddaten_baum','grunddaten_baum','varchar','','','0','10','Auswahlfeld','\'geringer\',\'höher\'','Sicherheitserwartung Verkehr','siehe Kapitel 5.2.1 der Baumkontrollrichtlinie (2010)','9'); 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`) VALUES(@last_layer_id242,'sorte','sorte','grunddaten_baum','grunddaten_baum','varchar','','','1','50','Text','','Sorte','','8'); 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`) VALUES(@last_layer_id242,'standort','standort','grunddaten_baum','grunddaten_baum','varchar','','','1','255','Text','','Standort','Straße oder Lagebezeichnung','4'); 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`) VALUES(@last_layer_id242,'status','status','grunddaten_baum','grunddaten_baum','varchar','','','0','10','Auswahlfeld','\'vorhanden\',\'gefällt\'','Status','Baum vorhanden oder gefällt','5'); 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`) VALUES(@last_layer_id242,'the_geom','the_geom','grunddaten_baum','grunddaten_baum','geometry','POINT','','1',NULL,'Geometrie','','','','13'); INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES('gefällt',@last_layer_id242,'(\'[status]\' eq \'gefällt\')','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,'punkt','14','225 207 167','','225 207 167','6','20',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,'kreuz_gefaellt','14','188 0 42','','255 255 255','6','20','360','',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, 1); INSERT INTO classes (`Name`,`Layer_ID`,`Expression`,`drawingorder`,`text`) VALUES(' vorhanden',@last_layer_id242,'(\'[status]\' eq \'vorhanden\')','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,'punkt','21','0 0 0','','-1 -1 -1','11','31',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,'punkt','20','76 159 0','','-1 -1 -1','10','30',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, 1); INSERT INTO styles (`symbol`,`symbolname`,`size`,`color`,`backgroundcolor`,`outlinecolor`,`minsize`,`maxsize`,`angle`,`angleitem`,`antialias`,`width`,`minwidth`,`maxwidth`,`sizeitem`) VALUES(NULL,'punkt','2','255 255 255','','-1 -1 -1','0','8',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, 2); 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('courier',NULL,'40 40 40','255 255 255','',NULL,NULL,'','',NULL,NULL,'8','8','8',NULL,'10','-10',NULL,NULL,NULL,'1',NULL,NULL,NULL,NULL,'1'); SET @last_label_id=LAST_INSERT_ID(); INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id); # Layer Baumkataster Kontrolldaten INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Kontrolldaten','5',@group_id,'SELECT kontrollid, k.baumid, baumnummer, datum, kontrollart, bearbeiter, baumhoehe, kronendurchmesser, stammumfang, alteramstandort, entwicklungsphase, CASE WHEN (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) = 0 THEN \'Kein Eintrag\' WHEN (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) = 1 THEN \'1 Eintrag\' ELSE (select k1 + k2 + k3 + k4 + k5 + k6 + k7 + k8 + k9 + k10 + k11 + k12 + k13 + k14 + k15 + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10 + s11 + s12 + s13 + s14 + w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + wu1 + wu2 + wu3 + v1 + v2 + v3 + v4 + v5 + v6 from regelkontrollen rk where rk.kontrollid=k.kontrollid) || \' Einträge\' END AS regelkontrollen, zustand, handlungsbedarf, bemerkung, \'anzeigen\' AS dokument FROM kontrollen k, grunddaten_baum g WHERE g.baumid=k.baumid ORDER BY datum ','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); SET @last_layer_id243=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`) VALUES(@last_layer_id243,'alteramstandort','alteramstandort','kontrollen','k','int2','','','1',NULL,'Text','','Alter (am Standort)','','9'); 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`) VALUES(@last_layer_id243,'baumhoehe','baumhoehe','kontrollen','k','int2','','','1',NULL,'Text','','Baumhöhe [m]','Angaben in Metern','6'); 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`) VALUES(@last_layer_id243,'baumid','baumid','kontrollen','k','int4','','','0',NULL,'Text','','Baum-ID','','1'); 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`) VALUES(@last_layer_id243,'baumnummer','baumnummer','grunddaten_baum','g','int4','','','0',NULL,'SubFormFK','242,baumid;no_new_window','Baumnummer','','2'); 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`) VALUES(@last_layer_id243,'bearbeiter','bearbeiter','kontrollen','k','varchar','','','0','100','Text','','Bearbeiter','','5'); 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`) VALUES(@last_layer_id243,'bemerkung','bemerkung','kontrollen','k','text','','','1',NULL,'Textfeld','','Bemerkungen','Bemerkungen zum Handlungsbedarf','14'); 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`) VALUES(@last_layer_id243,'datum','datum','kontrollen','k','date','','','0',NULL,'Text','','Datum der Kontrolle','','3'); 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`) VALUES(@last_layer_id243,'dokument','dokument','','','unknown','','',NULL,NULL,'SubFormEmbeddedPK','245,kontrollid,dokument;no_new_window','Dokumente','','15'); 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`) VALUES(@last_layer_id243,'entwicklungsphase','entwicklungsphase','kontrollen','k','varchar','','','0','20','Auswahlfeld','select bezeichnung as value, text as output from entwicklungsphasen order by id','Entwicklungsphase','siehe Kapitel 5.2.3.1 der Baumkontrollrichtlinie (2010)','10'); 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`) VALUES(@last_layer_id243,'handlungsbedarf','handlungsbedarf','kontrollen','k','varchar','','','0','4','SubFormEmbeddedPK','246,kontrollid,handlungsbedarf;embedded','Handlungsbedarf','','13'); 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`) VALUES(@last_layer_id243,'kontrollart','kontrollart','kontrollen','k','varchar','','','0','20','Auswahlfeld','\'Ersterfassung\',\'Regelkontrolle\'','Kontrollart','','4'); 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`) VALUES(@last_layer_id243,'kontrollid','kontrollid','kontrollen','k','int4','','','1',NULL,'Text','','Kontroll-ID','','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`) VALUES(@last_layer_id243,'kronendurchmesser','kronendurchmesser','kontrollen','k','int2','','','1',NULL,'Text','','Kronendurchmesser [m]','Angaben in Metern','7'); 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`) VALUES(@last_layer_id243,'regelkontrollen','CASE','','','text','','',NULL,NULL,'SubFormPK','250,kontrollid;no_new_window','Regelkontrolle','','11'); 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`) VALUES(@last_layer_id243,'stammumfang','stammumfang','kontrollen','k','numeric','','','1',NULL,'Text','','Stammumfang [m] (in 1 m Höhe)','Angaben in Metern, Nachkomma möglich','8'); 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`) VALUES(@last_layer_id243,'zustand','zustand','kontrollen','k','varchar','','','1','50','Auswahlfeld','\'gesund / leicht geschädigt\',\'stark geschädigt\'','Zustand','Allg. Einschätzung des Baumzustandes bez. der Stand- und Bruchsicherheit des Baumes','12'); # Layer Baumkataster Kontrolle Handlungsbedarf INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Kontrolle Handlungsbedarf','5',@group_id,'SELECT kontrollid, \'(\' || kontrollid || \') \' || datum as zurueck, handlungsbedarf, eingehendeuntersuchung, massnahme, massnahmeart, faellung, erledigung FROM kontrollen WHERE (1=1)','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); SET @last_layer_id246=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`) VALUES(@last_layer_id246,'eingehendeuntersuchung','eingehendeuntersuchung','kontrollen','kontrollen','varchar','','','0','4','Auswahlfeld','\'ja\',\'-\'','eingehende Untersuchung','z.B. Untersuchung auf Fäulen, Erstellung Baumgutachten','4'); 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`) VALUES(@last_layer_id246,'erledigung','erledigung','kontrollen','kontrollen','varchar','','','0','50','Auswahlfeld','\'sofort\',\'innerhalb von 2 Wochen\',\'innerhalb von 6 Monaten\',\'innerhalb der nächsten 2 Jahre\',\'-\'','Erledigung','siehe Kapitel 5.3.2.3 der Baumkontrollrichtlinie (2010)','8'); 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`) VALUES(@last_layer_id246,'faellung','faellung','kontrollen','kontrollen','varchar','','','0','4','Auswahlfeld','\'ja\',\'nein\'','Fällung','','7'); 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`) VALUES(@last_layer_id246,'handlungsbedarf','handlungsbedarf','kontrollen','kontrollen','varchar','','','0','4','Auswahlfeld','\'ja\',\'nein\'','Handlungsbedarf','','3'); 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`) VALUES(@last_layer_id246,'kontrollid','kontrollid','kontrollen','kontrollen','int4','','','1',NULL,'Text','','Kontroll-ID','','1'); 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`) VALUES(@last_layer_id246,'massnahme','massnahme','kontrollen','kontrollen','varchar','','','0','4','Auswahlfeld','\'ja\',\'-\'','Baumpflegerische Maßnahme','','5'); 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`) VALUES(@last_layer_id246,'massnahmeart','massnahmeart','kontrollen','kontrollen','varchar','','','1','50','Auswahlfeld','select bezeichnung as value, bezeichnung as output from baumkataster.massnahmearten order by bezeichnung','Art der Maßnahme','','6'); 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`) VALUES(@last_layer_id246,'oid','oid','','','oid','','',NULL,NULL,'Text','','','','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`) VALUES(@last_layer_id246,'zurueck','zurueck','','','text','','',NULL,NULL,'SubFormFK','243,kontrollid;no_new_window','zur Kontrolle','','2'); # Layer Baumkataster Regelkontrollen INSERT INTO layer (`Name`,`Datentyp`,`Gruppe`,`pfad`,`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`) VALUES('Baumkataster Regelkontrolle','5',@group_id,'SELECT r.kontrollid, \'(\' || r.kontrollid || \') \' || k.datum as zurueck, k1, k2, k3, k4, k5, k6, k7, k8, k9, k10, k11, k12, k13, k14, k15, bemerkungen_krone, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, bemerkungen_stamm, w1, w2, w3, w4, w5, w6, w7, w8, bemerkungen_stammfuss, wu1, wu2, wu3, bemerkungen_wurzel, v1, v2, v3, v4, v5, v6, bemerkungen_umfeld FROM kontrollen k, regelkontrollen r WHERE k.kontrollid=r.kontrollid','','baumkataster','','','','','',NULL,NULL,'',@connection,'','6','kontrollid','kontrollid','10','pixels','25833','','1','100',NULL,'-1','-1','','EPSG:2398','','1.1.0','image/png','60','','','','','0','0'); SET @last_layer_id250=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`) VALUES(@last_layer_id250,'bemerkungen_krone','bemerkungen_krone','regelkontrollen','r','text','','','1',NULL,'Textfeld','','Bemerkungen Krone','','17'); 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`) VALUES(@last_layer_id250,'bemerkungen_stamm','bemerkungen_stamm','regelkontrollen','r','text','','','1',NULL,'Textfeld','','Bemerkungen Stamm','','32'); 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`) VALUES(@last_layer_id250,'bemerkungen_stammfuss','bemerkungen_stammfuss','regelkontrollen','r','text','','','1',NULL,'Textfeld','','Bemerkungen Stammfuß','','41'); 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`) VALUES(@last_layer_id250,'bemerkungen_umfeld','bemerkungen_umfeld','regelkontrollen','r','text','','','1',NULL,'Textfeld','','Bemerkungen Umfeld','','52'); 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`) VALUES(@last_layer_id250,'bemerkungen_wurzel','bemerkungen_wurzel','regelkontrollen','r','text','','','1',NULL,'Textfeld','','Bemerkungen Wurzel','','45'); 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`) VALUES(@last_layer_id250,'k1','k1','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Astab-/ausbrüche','','2'); 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`) VALUES(@last_layer_id250,'k10','k10','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Pilzbefall','Pilzart bei Bemerkung eintragen!','11'); 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`) VALUES(@last_layer_id250,'k11','k11','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Rindenschäden','','12'); 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`) VALUES(@last_layer_id250,'k12','k12','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Totholzbildung','','13'); 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`) VALUES(@last_layer_id250,'k13','k13','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Vergabelungen','','14'); 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`) VALUES(@last_layer_id250,'k14','k14','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Wipfeldürre','','15'); 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`) VALUES(@last_layer_id250,'k15','k15','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Zwiesel','','16'); 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`) VALUES(@last_layer_id250,'k2','k2','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Astungswunden/-fäulen','','3'); 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`) VALUES(@last_layer_id250,'k3','k3','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Baumfremder Bewuchs','','4'); 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`) VALUES(@last_layer_id250,'k4','k4','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Belaubung (Auffälligkeiten)','','5'); 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`) VALUES(@last_layer_id250,'k5','k5','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Fehlentwicklung','','6'); 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`) VALUES(@last_layer_id250,'k6','k6','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Höhlungen','','7'); 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`) VALUES(@last_layer_id250,'k7','k7','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Kappungsstellen','','8'); 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`) VALUES(@last_layer_id250,'k8','k8','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Kronensicherungen','','9'); 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`) VALUES(@last_layer_id250,'k9','k9','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Krone - Lichtraumprofil','','10'); 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`) VALUES(@last_layer_id250,'kontrollid','kontrollid','regelkontrollen','r','int4','','','0',NULL,'Text','','Kontroll-ID','','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`) VALUES(@last_layer_id250,'s1','s1','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Anfahrschäden','','18'); 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`) VALUES(@last_layer_id250,'s10','s10','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Schadinsekten','','27'); 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`) VALUES(@last_layer_id250,'s11','s11','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Schrägstand','','28'); 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`) VALUES(@last_layer_id250,'s12','s12','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Stammaustriebe','','29'); 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`) VALUES(@last_layer_id250,'s13','s13','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Wuchsanomalien','','30'); 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`) VALUES(@last_layer_id250,'s14','s14','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Zwiesel','','31'); 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`) VALUES(@last_layer_id250,'s2','s2','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Astungswunden','','19'); 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`) VALUES(@last_layer_id250,'s3','s3','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Baumfremder Bewuchs','','20'); 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`) VALUES(@last_layer_id250,'s4','s4','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Fäulen','','21'); 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`) VALUES(@last_layer_id250,'s5','s5','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Gewindestangen o.ä.','','22'); 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`) VALUES(@last_layer_id250,'s6','s6','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Höhlungen','','23'); 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`) VALUES(@last_layer_id250,'s7','s7','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Pilzbefall','Pilzart bei Bemerkung eintragen!','24'); 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`) VALUES(@last_layer_id250,'s8','s8','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Rindenschäden','','25'); 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`) VALUES(@last_layer_id250,'s9','s9','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stamm - Risse','','26'); 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`) VALUES(@last_layer_id250,'v1','v1','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Umfeld - Baugruben/-gräben','','46'); 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`) VALUES(@last_layer_id250,'v2','v2','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Umfeld - Bodenauf-/-abtrag','','47'); 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`) VALUES(@last_layer_id250,'v3','v3','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Umfeld - Bodenverdichtung','','48'); 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`) VALUES(@last_layer_id250,'v4','v4','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Umfeld - Bodenversiegelung','','49'); 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`) VALUES(@last_layer_id250,'v5','v5','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Umfeld - Freistellung','','50'); 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`) VALUES(@last_layer_id250,'v6','v6','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Umfeld - Grundwasserabsenkung/-stau','','51'); 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`) VALUES(@last_layer_id250,'w1','w1','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Adventiv-/Würgewurzeln','','33'); 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`) VALUES(@last_layer_id250,'w2','w2','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Höhlungen','','34'); 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`) VALUES(@last_layer_id250,'w3','w3','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Pilzbefall','Pilzart bei Bemerkung eintragen!','35'); 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`) VALUES(@last_layer_id250,'w4','w4','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Rindenschäden','','36'); 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`) VALUES(@last_layer_id250,'w5','w5','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Risse','','37'); 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`) VALUES(@last_layer_id250,'w6','w6','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Verbreiterung','','38'); 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`) VALUES(@last_layer_id250,'w7','w7','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Stockaustriebe','','39'); 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`) VALUES(@last_layer_id250,'w8','w8','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Stammfuß - Wuchsanomalien','','40'); 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`) VALUES(@last_layer_id250,'wu1','wu1','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Wurzel - Bodenaufwölbungen','','42'); 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`) VALUES(@last_layer_id250,'wu2','wu2','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Wurzel - Risse','','43'); 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`) VALUES(@last_layer_id250,'wu3','wu3','regelkontrollen','r','int2','','','1',NULL,'Auswahlfeld','select \'0\' as value, \'-\' as output UNION select \'1\' as value, \'ja\' as output','Wurzel - Pilzbefall','Pilzart bei Bemerkung eintragen!','44'); 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`) VALUES(@last_layer_id250,'zurueck','zurueck','','','text','','',NULL,NULL,'SubFormFK','243,kontrollid;no_new_window','zur Kontrolle','','1'); UPDATE layer_attributes SET options = REPLACE(options, '245', @last_layer_id245) WHERE layer_id IN(@last_layer_id245, @last_layer_id242, @last_layer_id243, @last_layer_id246, @last_layer_id250) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); UPDATE layer_attributes SET options = REPLACE(options, '242', @last_layer_id242) WHERE layer_id IN(@last_layer_id245, @last_layer_id242, @last_layer_id243, @last_layer_id246, @last_layer_id250) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); UPDATE layer_attributes SET options = REPLACE(options, '243', @last_layer_id243) WHERE layer_id IN(@last_layer_id245, @last_layer_id242, @last_layer_id243, @last_layer_id246, @last_layer_id250) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); UPDATE layer_attributes SET options = REPLACE(options, '246', @last_layer_id246) WHERE layer_id IN(@last_layer_id245, @last_layer_id242, @last_layer_id243, @last_layer_id246, @last_layer_id250) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK'); UPDATE layer_attributes SET options = REPLACE(options, '250', @last_layer_id250) WHERE layer_id IN(@last_layer_id245, @last_layer_id242, @last_layer_id243, @last_layer_id246, @last_layer_id250) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');