GLE-Layer-FMK-Raumordnung

Aus kvwmap
Wechseln zu: Navigation, Suche

SQL-Dump der in kvwmap für die Fachschale FMK benötigten Layer, Klassen, Attribute, Labels, Styles und Drucklayouts für die Raumordnung

zurück zur Fachschalenbeschreibung

Folgende Anpassungen müssen vorgenommen werden

  • Anpassung der ID der Gruppe zu der der Layer der Raumordnung gehören soll
  • Anpassung der ID der Connection für den Zugang zur Postgre-Datenbank
 -- Layerdump aus kvwmap vom 07.09.2023 11:14:29
 -- 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.
 SET @group_id = 1;
 SET @connection = ;
 SET @connection_id = '1';
 -- Layer 50
 INSERT INTO layer (`Name`, `alias`, `Datentyp`, `Gruppe`, `pfad`, `maintable`, `oid`, `Data`, `schema`, `document_path`, `tileindex`, `tileitem`, `labelangleitem`, `labelitem`, `labelmaxscale`, `labelminscale`, `labelrequires`, `connection`, `connection_id`, `printconnection`, `connectiontype`, `classitem`, `tolerance`, `toleranceunits`, `sizeunits`, `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`, `write_mapserver_templates`, `selectiontype`, `querymap`, `logconsume`, `processing`, `kurzbeschreibung`, `datasource`, `dataowner_name`, `dataowner_email`, `dataowner_tel`, `uptodateness`, `updatecycle`, `metalink`, `privileg`, `trigger_function`) VALUES ('Planungsräume', , '2', @group_id, 'SELECT\r\n  gid,\r\n  plr,\r\n  plr_ziffer,\r\n  txt,\r\n  the_geom\r\nFROM\r\n  planungsraumflaechen\r\nWHERE\r\n  true', 'planungsraumflaechen', 'gid', 'the_geom from (SELECT gid, txt, plr, the_geom FROM raumordnung.planungsraumflaechen) as foo using unique gid using srid=25832', 'raumordnung', , , , , 'txt', NULL, NULL, , @connection, @connection_id, , '6', 'plr', '3', 'pixels', NULL, '25832', , '1', '60', '60', NULL, NULL, , 'EPSG:4326', , '1.0.0', 'image/png', '60', , , , , , '1', '0', , , '9', , , , , , , '0', );
 SET @last_layer_id50=LAST_INSERT_ID();
 -- Attribut gid des Layers 50
 INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50, 'gid', 'gid', 'planungsraumflaechen', 'planungsraumflaechen', 'int4', , 'PRIMARY KEY', '1', '0', '32', '0', , 'Text', , 'ID', , , , , , , '0', '0', NULL, '0', '-1', NULL, '1', , , , '1', '0', '0');
 -- Attribut plr des Layers 50
 INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50, 'plr', 'plr', 'planungsraumflaechen', 'planungsraumflaechen', 'int4', , , '1', '1', '32', '0', , 'Text', , 'Nummer', , , , , , , '0', '0', NULL, '0', '-1', NULL, '1', , , , '19', '0', '0');
 -- Attribut plr_ziffer des Layers 50
 INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50, 'plr_ziffer', 'plr_ziffer', 'planungsraumflaechen', 'planungsraumflaechen', 'varchar', , , '1', '1', NULL, NULL, , 'Text', , 'Ziffer', , , , , , , '0', '0', NULL, '0', '-1', NULL, '1', , , , '17', '0', '0');
 -- Attribut the_geom des Layers 50
 INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50, 'the_geom', 'the_geom', 'planungsraumflaechen', 'planungsraumflaechen', 'geometry', 'MULTIPOLYGON', , '1', '1', NULL, NULL, , 'Geometrie', , , , , , , , , '0', '0', NULL, '0', '-1', NULL, '1', , , , '22', '0', '0');
 -- Attribut txt des Layers 50
 INSERT INTO layer_attributes (`layer_id`, `name`, `real_name`, `tablename`, `table_alias_name`, `type`, `geometrytype`, `constraints`, `saveable`, `nullable`, `length`, `decimal_length`, `default`, `form_element_type`, `options`, `alias`, `alias_low-german`, `alias_english`, `alias_polish`, `alias_vietnamese`, `tooltip`, `group`, `arrangement`, `labeling`, `raster_visibility`, `dont_use_for_new`, `mandatory`, `quicksearch`, `visible`, `vcheck_attribute`, `vcheck_operator`, `vcheck_value`, `order`, `privileg`, `query_tooltip`) VALUES (@last_layer_id50, 'txt', 'txt', 'planungsraumflaechen', 'planungsraumflaechen', 'varchar', , , '1', '1', NULL, NULL, , 'Text', , 'Bezeichnung', , , , , , , '0', '0', NULL, '0', '0', NULL, '1', , , , '9', '0', '1');
 -- Class 198 des Layers 50
 INSERT INTO classes (`Name`, `Layer_ID`, `Expression`, `drawingorder`, `text`) VALUES (' ', @last_layer_id50, , NULL, );
 SET @last_class_id=LAST_INSERT_ID();
 -- Style 122 der Class 198
 INSERT INTO styles (`symbol`, `symbolname`, `size`, `color`, `backgroundcolor`, `outlinecolor`, `colorrange`, `datarange`, `rangeitem`, `opacity`, `minsize`, `maxsize`, `minscale`, `maxscale`, `angle`, `angleitem`, `width`, `minwidth`, `maxwidth`, `offsetx`, `offsety`, `polaroffset`, `pattern`, `geomtransform`, `gap`, `initialgap`, `linecap`, `linejoin`, `linejoinmaxsize`) VALUES (NULL, , '1', , , '025 025 112', , , , '50', , , NULL, NULL, , , '3', '2', '2', NULL, NULL, , , , NULL, NULL, , , NULL);
 SET @last_style_id=LAST_INSERT_ID();
 -- Zuordnung Style 122 zu Class 198
 INSERT INTO u_styles2classes (style_id, class_id, drawingorder) VALUES (@last_style_id, @last_class_id, 0);
 -- Label 15 der Class 198
 INSERT INTO labels (`font`, `type`, `color`, `outlinecolor`, `shadowcolor`, `shadowsizex`, `shadowsizey`, `backgroundcolor`, `backgroundshadowcolor`, `backgroundshadowsizex`, `backgroundshadowsizey`, `size`, `minsize`, `maxsize`, `position`, `offsetx`, `offsety`, `angle`, `anglemode`, `buffer`, `minfeaturesize`, `maxfeaturesize`, `partials`, `wrap`, `the_force`) VALUES ('arial', NULL, , , , NULL, NULL, , , NULL, NULL, '10', '6', '12', '6', NULL, NULL, , NULL, NULL, NULL, NULL, NULL, NULL, NULL);
 SET @last_label_id=LAST_INSERT_ID();
 -- Zuordnung Label 15 zu Class 198
 INSERT INTO u_labels2classes (label_id, class_id) VALUES (@last_label_id, @last_class_id);
 -- Replace attribute options for Layer 50
 UPDATE layer_attributes SET options = REPLACE(options, 'layer_id=50', CONCAT('layer_id=', @last_layer_id50)) WHERE layer_id IN (@last_layer_id50) AND form_element_type IN ('Autovervollständigungsfeld', 'Auswahlfeld', 'Link','dynamicLink');
 UPDATE layer_attributes SET options = REPLACE(options, '50,', CONCAT(@last_layer_id50, ',')) WHERE layer_id IN (@last_layer_id50) AND form_element_type IN ('SubFormPK', 'SubFormFK', 'SubFormEmbeddedPK');