Skip to content

Commit

Permalink
fix: set up test structure for QGIS 3.28
Browse files Browse the repository at this point in the history
Tests should read both pre-3.28 QML - from data/qmls_old
and, post-3.28 QML - stored in data/qmls

When writing, the output should be 3.28 compatible.

This only sets up the new text structure -
the test data and conversion logic is not yet updated to be 3.28 compatible.
  • Loading branch information
olsen232 authored and KaiVolland committed Dec 12, 2024
1 parent 9b0cd7f commit 43b1524
Show file tree
Hide file tree
Showing 25 changed files with 717 additions and 97 deletions.
2 changes: 1 addition & 1 deletion data/qmls/line_simple.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/no_symbolizer.qml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="nullSymbol"/>
</qgis>
2 changes: 1 addition & 1 deletion data/qmls/point_external_graphic.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/point_label.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="nullSymbol"/>
<labeling type="rule-based">
<rules key="labeling_rules">
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/point_multiple_symbols.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/point_ranges.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 forceraster="0" graduatedMethod="GraduatedColor" type="graduatedSymbol" attr="PlotNr" symbollevels="0" enableorderby="0">
<ranges>
<range symbol="0" upper="20.000000000000000" label=" 1,0000 - 20,0000 " lower="1.000000000000000" render="true"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/point_rules.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="Bildpositi = 1" scalemindenom="100" scalemaxdenom="2000" filter="Bildpositi = 1"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/point_simple.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/polygon_simple.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/polygon_simple_nostyle.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
Expand Down
2 changes: 1 addition & 1 deletion data/qmls/text_text_buffer.qml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<qgis version="3.28.0-Firenze">
<renderer-v2 type="nullSymbol"/>
<labeling type="rule-based">
<rules key="labeling_rules">
Expand Down
23 changes: 23 additions & 0 deletions data/qmls_old/line_simple.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
</rules>
<symbols>
<symbol type="line" name="0">
<layer class="SimpleLine">
<prop k="line_color" v="255,0,255,255"/>
<prop k="offset" v="2"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="Pixel"/>
<prop k="joinstyle" v="round"/>
<prop k="capstyle" v="square"/>
<prop k="line_width" v="3"/>
<prop k="line_width_unit" v="Pixel"/>
<prop k="customdash" v="12;12"/>
</layer>
</symbol>
</symbols>
</renderer-v2>
</qgis>
4 changes: 4 additions & 0 deletions data/qmls_old/no_symbolizer.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<renderer-v2 type="nullSymbol"/>
</qgis>
163 changes: 163 additions & 0 deletions data/qmls_old/point_categories.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis simplifyMaxScale="1" simplifyDrawingTol="1" hasScaleBasedVisibilityFlag="0" styleCategories="AllStyleCategories" simplifyDrawingHints="0" simplifyLocal="1" simplifyAlgorithm="0" version="3.4.3-Madeira" maxScale="0" minScale="1e+8" labelsEnabled="0" readOnly="0">
<renderer-v2 forceraster="0" type="categorizedSymbol" attr="Bildpositi" symbollevels="0" enableorderby="0">
<categories>
<category value="1" symbol="0" label="1" render="true"/>
<category value="2" symbol="1" label="2" render="true"/>
<category value="3" symbol="2" label="3" render="true"/>
<category value="" symbol="3" label="" render="true"/>
</categories>
<symbols>
<symbol type="marker" alpha="1" force_rhr="0" name="0" clip_to_extent="1">
<layer locked="0" class="SimpleMarker" enabled="1" pass="0">
<prop k="angle" v="0"/>
<prop k="color" v="138,220,56,255"/>
<prop k="horizontal_anchor_point" v="1"/>
<prop k="joinstyle" v="bevel"/>
<prop k="name" v="circle"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="scale_method" v="diameter"/>
<prop k="size" v="4"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="MM"/>
<prop k="vertical_anchor_point" v="1"/>
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol type="marker" alpha="1" force_rhr="0" name="1" clip_to_extent="1">
<layer locked="0" class="SimpleMarker" enabled="1" pass="0">
<prop k="angle" v="0"/>
<prop k="color" v="234,93,93,255"/>
<prop k="horizontal_anchor_point" v="1"/>
<prop k="joinstyle" v="bevel"/>
<prop k="name" v="circle"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="scale_method" v="diameter"/>
<prop k="size" v="4"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="MM"/>
<prop k="vertical_anchor_point" v="1"/>
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol type="marker" alpha="1" force_rhr="0" name="2" clip_to_extent="1">
<layer locked="0" class="SimpleMarker" enabled="1" pass="0">
<prop k="angle" v="0"/>
<prop k="color" v="105,219,219,255"/>
<prop k="horizontal_anchor_point" v="1"/>
<prop k="joinstyle" v="bevel"/>
<prop k="name" v="circle"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="scale_method" v="diameter"/>
<prop k="size" v="4"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="MM"/>
<prop k="vertical_anchor_point" v="1"/>
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
<symbol type="marker" alpha="1" force_rhr="0" name="3" clip_to_extent="1">
<layer locked="0" class="SimpleMarker" enabled="1" pass="0">
<prop k="angle" v="0"/>
<prop k="color" v="158,110,205,255"/>
<prop k="horizontal_anchor_point" v="1"/>
<prop k="joinstyle" v="bevel"/>
<prop k="name" v="circle"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="scale_method" v="diameter"/>
<prop k="size" v="4"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="MM"/>
<prop k="vertical_anchor_point" v="1"/>
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</symbols>
<source-symbol>
<symbol type="marker" alpha="1" force_rhr="0" name="0" clip_to_extent="1">
<layer locked="0" class="SimpleMarker" enabled="1" pass="0">
<prop k="angle" v="0"/>
<prop k="color" v="190,178,151,255"/>
<prop k="horizontal_anchor_point" v="1"/>
<prop k="joinstyle" v="bevel"/>
<prop k="name" v="circle"/>
<prop k="offset" v="0,0"/>
<prop k="offset_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="offset_unit" v="MM"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="scale_method" v="diameter"/>
<prop k="size" v="4"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="MM"/>
<prop k="vertical_anchor_point" v="1"/>
<data_defined_properties>
<Option type="Map">
<Option value="" type="QString" name="name"/>
<Option name="properties"/>
<Option value="collection" type="QString" name="type"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</source-symbol>
<colorramp type="randomcolors" name="[source]"/>
<rotation/>
<sizescale/>
</renderer-v2>
</qgis>
20 changes: 20 additions & 0 deletions data/qmls_old/point_external_graphic.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
</rules>
<symbols>
<symbol type="marker" name="0">
<layer class="SvgMarker">
<prop k="angle" v="0"/>
<prop k="color" v="125,139,143,255"/>
<prop k="name" v="https://upload.wikimedia.org/wikipedia/commons/6/67/OpenLayers_logo.svg"/>
<prop k="size" v="69"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="Pixel"/>
</layer>
</symbol>
</symbols>
</renderer-v2>
</qgis>
14 changes: 14 additions & 0 deletions data/qmls_old/point_label.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<renderer-v2 type="nullSymbol"/>
<labeling type="rule-based">
<rules key="labeling_rules">
<rule key="labeling_rule_0" filter="value > 0.1">
<settings>
<text-style fontSize="10" fontLetterSpacing="0" multilineHeight="1" textColor="0,0,0,255" fontFamily="Sans Serif" fieldName="locality_name"/>
<placement predefinedPositionOrder="TR,TL,BR,BL,R,L,TSR,BSR" xOffset="13" yOffset="37" rotationAngle="0"/>
</settings>
</rule>
</rules>
</labeling>
</qgis>
38 changes: 38 additions & 0 deletions data/qmls_old/point_multiple_symbols.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis>
<renderer-v2 type="RuleRenderer">
<rules key="renderer_rules">
<rule key="renderer_rule_0" symbol="0" label="QGIS Simple Symbol"/>
</rules>
<symbols>
<symbol type="marker" name="0">
<layer class="SimpleMarker">
<prop k="angle" v="0"/>
<prop k="color" v="75,255,126,255"/>
<prop k="name" v="square"/>
<prop k="outline_color" v="0,0,0,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="1"/>
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="outline_width_unit" v="Pixel"/>
<prop k="size" v="24"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="Pixel"/>
</layer>
<layer class="SimpleMarker">
<prop k="angle" v="0"/>
<prop k="color" v="255,0,0,255"/>
<prop k="name" v="circle"/>
<prop k="outline_color" v="35,35,35,255"/>
<prop k="outline_style" v="solid"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="outline_width_unit" v="Pixel"/>
<prop k="size" v="4"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="Pixel"/>
</layer>
</symbol>
</symbols>
</renderer-v2>
</qgis>
Loading

0 comments on commit 43b1524

Please sign in to comment.