GLE-Layer-Brach-/Entwicklungsflächen: Unterschied zwischen den Versionen

Aus kvwmap
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „'''Layerdump''' aus kvwmap vom 21.02.2019 Achtung: Die Datenbank, in die der Dump eingespielt wird, sollte die gleiche Migrationsversion haben, wie die Datenb…“)
 
 
Zeile 7: Zeile 7:
 
Für die Label werden die Schriftarten ubuntu und ubuntu-medium verwendet.
 
Für die Label werden die Schriftarten ubuntu und ubuntu-medium verwendet.
  
  SET @group_id = 1;
+
  <nowiki>SET @group_id = 1;
 
  SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp';
 
  SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp';
 
   
 
   
Zeile 108: Zeile 108:
 
  -- Replace attribute options for Layer 50303838
 
  -- Replace attribute options for Layer 50303838
 
  UPDATE layer_attributes SET options = REPLACE(options, 'layer_id=50303838', CONCAT('layer_id=', @last_layer_id50303838)) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('Autovervollständigungsfeld', 'Auswahlfeld', 'Link','dynamicLink');
 
  UPDATE layer_attributes SET options = REPLACE(options, 'layer_id=50303838', CONCAT('layer_id=', @last_layer_id50303838)) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('Autovervollständigungsfeld', 'Auswahlfeld', 'Link','dynamicLink');
  UPDATE layer_attributes SET options = REPLACE(options, '50303838,', CONCAT(@last_layer_id50303838, ',')) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');
+
  UPDATE layer_attributes SET options = REPLACE(options, '50303838,', CONCAT(@last_layer_id50303838, ',')) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');</nowiki>

Aktuelle Version vom 29. März 2023, 11:00 Uhr

Layerdump aus kvwmap vom 21.02.2019

Achtung: Die Datenbank, in die der Dump eingespielt wird, sollte die gleiche Migrationsversion haben, wie die Datenbank aus der exportiert wurde! Anderenfalls kann es zu Fehlern bei der Ausführung des SQL kommen.

Achtung: Der abhängige Layer "Brach/ Entwicklungsflächen Seitenlängen" muss per REQUIRES an den Layer "Brach/ Entwicklungsflächen" gehängt werden!

Für die Label werden die Schriftarten ubuntu und ubuntu-medium verwendet.

SET @group_id = 1;
 SET @connection = 'user=xxxx password=xxxx dbname=kvwmapsp';
 
 -- Layer 50303834
 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`, `trigger_function`, `sync`) VALUES ('Brach/ Entwicklungsflächen', '', '2', @group_id, 'Select id, art, flaeche, bemerkungen, bearbeiter, letzte_akt, the_geom, stelle from brach_entwicklungsflaechen where 1=1', 'brach_entwicklungsflaechen', 'the_geom from (select oid, art, (cast(round(flaeche,1) as text) || \' m²\') as label, the_geom, stelle from geodaten_gemeinden.brach_entwicklungsflaechen) as foo using unique oid using SRID=25833', 'geodaten_gemeinden', '', '', '', '', 'label', '50000', '50', '', @connection, '', '6', '', '', '3', 'pixels', '25833', '', '1', '50', '5005', '50', '700000', '', 'EPSG:25833', '', '1.1.0', 'image/png', '60', '', '', '', '', '1', '0', '', 'Stellt die Brach- und Entwicklungsflächen dar. Wird stellenbezogen gefiltert!', 'Amtsverwaltungen', '', '0', '', '');
 SET @last_layer_id50303834=LAST_INSERT_ID();
 
 -- Attribut art des Layers 50303834
 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_id50303834, 'art', 'art', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'varchar', '', '', '0', NULL, NULL, '', 'Auswahlfeld', '\'Brachland\',\'Entwicklungsland\'', 'Art', '', '', '', '', '', '', NULL, '0', '1', '0', '0');
 
 -- Attribut bearbeiter des Layers 50303834
 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_id50303834, 'bearbeiter', 'bearbeiter', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'varchar', '', '', '1', NULL, NULL, '', 'User', '', 'Bearbeiter', '', '', '', '', '', '', NULL, '0', '4', '0', '0');
 
 -- Attribut bemerkungen des Layers 50303834
 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_id50303834, 'bemerkungen', 'bemerkungen', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'text', '', '', '1', NULL, NULL, '', 'Textfeld', '', 'Bemerkungen', '', '', '', '', '', '', NULL, '0', '3', '0', '0');
 
 -- Attribut flaeche des Layers 50303834
 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_id50303834, 'flaeche', 'flaeche', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'numeric', '', '', '1', NULL, NULL, '', 'Fläche', '', 'Fläche [m²]', '', '', '', '', '', '', NULL, '0', '2', '0', '0');
 
 -- Attribut id des Layers 50303834
 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_id50303834, 'id', 'id', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'int4', '', 'PRIMARY KEY', '1', '32', '0', '', 'Text', '', 'ID', '', '', '', '', '', '', NULL, '0', '0', '0', '0');
 
 -- Attribut letzte_akt des Layers 50303834
 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_id50303834, 'letzte_akt', 'letzte_akt', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'date', '', '', '1', NULL, NULL, '', 'Time', '', 'Letzte Aktualisierung', '', '', '', '', '', '', NULL, '0', '5', '0', '0');
 
 -- Attribut stelle des Layers 50303834
 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_id50303834, 'stelle', 'stelle', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'varchar', '', '', '1', NULL, NULL, '', 'StelleID', '', 'Stelle', '', '', '', '', '', '', NULL, '0', '7', '0', '0');
 
 -- Attribut the_geom des Layers 50303834
 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_id50303834, 'the_geom', 'the_geom', 'brach_entwicklungsflaechen', 'brach_entwicklungsflaechen', 'geometry', 'MULTIPOLYGON', '', '0', NULL, NULL, '', 'Geometrie', '', 'Geometrie', '', '', '', '', '', '', NULL, '0', '6', '0', '0');
 
 -- Class 51776237 des Layers 50303834
 INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES ('Brachland', @last_layer_id50303834, '(\'[art]\' = \'Brachland\')', '1', '');
 SET @last_class_id=LAST_INSERT_ID();
 
 -- Style 51059497 der Class 51776237
 INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `minsize`, `maxsize`, `angle`, `angleitem`, `antialias`, `width`, `minwidth`, `maxwidth`) VALUES (NULL, '', '', '214 137 16', '', '-1 -1 -1', NULL, NULL, '', '', NULL, NULL, NULL, NULL);
 SET @last_style_id=LAST_INSERT_ID();
 -- Zuordnung Style 51059497 zu Class 51776237
 INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);
 
 -- Label 50218781 der Class 51776237
 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 ('ubuntu-medium', NULL, '40 40 40', '250 250 250', '', NULL, NULL, '', '', NULL, NULL, '7', '6', '8', '8', NULL, NULL, NULL, NULL, '10', '1', NULL, NULL, '1', NULL, '1');
 SET @last_label_id=LAST_INSERT_ID();
 -- Zuordnung Label 50218781 zu Class 51776237
 INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);
 
 -- Class 51776238 des Layers 50303834
 INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES ('Entwicklungsland', @last_layer_id50303834, '(\'[art]\' = \'Entwicklungsland\')', '2', '');
 SET @last_class_id=LAST_INSERT_ID();
 
 -- Style 51059498 der Class 51776238
 INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `minsize`, `maxsize`, `angle`, `angleitem`, `antialias`, `width`, `minwidth`, `maxwidth`) VALUES (NULL, '', '', '96 163 191', '', '-1 -1 -1', NULL, NULL, '', '', NULL, NULL, NULL, NULL);
 SET @last_style_id=LAST_INSERT_ID();
 -- Zuordnung Style 51059498 zu Class 51776238
 INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);
 
 -- Label 50218782 der Class 51776238
 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 ('ubuntu-medium', NULL, '40 40 40', '250 250 250', '', NULL, NULL, '', '', NULL, NULL, '7', '6', '8', '8', NULL, NULL, NULL, NULL, '10', '1', NULL, NULL, NULL, NULL, NULL);
 SET @last_label_id=LAST_INSERT_ID();
 -- Zuordnung Label 50218782 zu Class 51776238
 INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);
 
 -- Layer 50303838
 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`, `trigger_function`, `sync`) VALUES ('Brach/ Entwicklungsflächen Seitenlängen', '', '1', @group_id, '', '', 'the_geom from (select id, label, the_geom, stelle from geodaten_gemeinden.brach_entwicklungsflaechen_view) as foo using unique id using SRID=25833', 'geodaten_gemeinden', '', '', '', '', 'label', '5000', '50', '', @connection, '', '6', '', '', '3', 'pixels', '25833', '', '1', '70', '5006', '50', '10000', '', 'EPSG:25833', '', '1.1.0', 'image/png', '60', '', '', '', '', '1', '0', '', 'Stellt die Kanten und Knoten der Brach- und Entwicklungsflächen dar. Wird stellenbezogen gefiltert!', 'Amtsverwaltungen', '', '0', '', '');
 SET @last_layer_id50303838=LAST_INSERT_ID();
 
 -- Class 51776723 des Layers 50303838
 INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES ('', @last_layer_id50303838, '', '1', '');
 SET @last_class_id=LAST_INSERT_ID();
 
 -- Style 51064236 der Class 51776723
 INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `minsize`, `maxsize`, `angle`, `angleitem`, `antialias`, `width`, `minwidth`, `maxwidth`) VALUES (NULL, '', '', '40 40 40', '', '-1 -1 -1', NULL, NULL, '360', '', NULL, '2', '2', '2');
 SET @last_style_id=LAST_INSERT_ID();
 -- Zuordnung Style 51064236 zu Class 51776723
 INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);
 
 -- Style 51064062 der Class 51776723
 INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `minsize`, `maxsize`, `angle`, `angleitem`, `antialias`, `width`, `minwidth`, `maxwidth`, `geomtransform`) VALUES (NULL, 'punkt', '7', '0 0 0', '', '-1 -1 -1', '6', '8', '', '', NULL, NULL, NULL, NULL, 'start');
 SET @last_style_id=LAST_INSERT_ID();
 -- Zuordnung Style 51064062 zu Class 51776723
 INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 1);
 
 -- Style 51064067 der Class 51776723
 INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `minsize`, `maxsize`, `angle`, `angleitem`, `antialias`, `width`, `minwidth`, `maxwidth`, `geomtransform`) VALUES (NULL, 'punkt', '7', '0 0 0', '', '-1 -1 -1', '6', '8', '', '', NULL, NULL, NULL, NULL, 'end');
 SET @last_style_id=LAST_INSERT_ID();
 -- Zuordnung Style 51064067 zu Class 51776723
 INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 2);
 
 -- Label 50218785 der Class 51776723
 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 ('ubuntu', NULL, '0 0 0', '250 250 250', '', NULL, NULL, '', '', NULL, NULL, '6', '5', '7', '8', '1', NULL, NULL, '1', NULL, '1', NULL, NULL, '1', NULL, '1');
 SET @last_label_id=LAST_INSERT_ID();
 -- Zuordnung Label 50218785 zu Class 51776723
 INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);
 
 -- Replace attribute options for Layer 50303834
 UPDATE layer_attributes SET options = REPLACE(options, 'layer_id=50303834', CONCAT('layer_id=', @last_layer_id50303834)) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('Autovervollständigungsfeld', 'Auswahlfeld', 'Link','dynamicLink');
 UPDATE layer_attributes SET options = REPLACE(options, '50303834,', CONCAT(@last_layer_id50303834, ',')) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');
 
 -- Replace attribute options for Layer 50303838
 UPDATE layer_attributes SET options = REPLACE(options, 'layer_id=50303838', CONCAT('layer_id=', @last_layer_id50303838)) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('Autovervollständigungsfeld', 'Auswahlfeld', 'Link','dynamicLink');
 UPDATE layer_attributes SET options = REPLACE(options, '50303838,', CONCAT(@last_layer_id50303838, ',')) WHERE layer_id IN (@last_layer_id50303834, @last_layer_id50303838) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');