Commit 79734c6b authored by Michel Stuyts's avatar Michel Stuyts 🌐

Added "Holiday Random" style to the repository

parent f84b60ee
This diff is collapsed.
# Holiday Random
This style is holiday themed, but it's actually all about adding randomized styling to your layer. The stars are located on the points of your layer, but they change color anytime you interact with the map (zoom, move, select,...). At the same time christmas trees are added tot the map at random locations inside the bounding box of your points layer. Everytime you interact with the map the trees change location. For each point in your layer, 3 trees are shown on the map.
<table><tr><td><a href="https://gitlab.com/GIS-projects/qgis-geometry-generator-examples/raw/master/QML-files/holiday_random/holiday_random.qml?inline=false"><img src="../../Example_images/holiday_random.gif"></a></td></tr></table>
[Download the QML file for this Geometry Generator Style](https://gitlab.com/GIS-projects/qgis-geometry-generator-examples/raw/master/QML-files/holiday_random/holiday_random.qml?inline=false)
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis version="3.4.2-Madeira" styleCategories="Symbology">
<renderer-v2 symbollevels="0" type="singleSymbol" enableorderby="0" forceraster="0">
<symbols>
<symbol clip_to_extent="1" type="marker" name="0" alpha="1">
<layer enabled="1" class="GeometryGenerator" pass="0" locked="0">
<prop k="SymbolType" v="Marker"/>
<prop k="geometryModifier" v=" with_variable( &#xd;&#xa;&#x9;'y_max',&#xd;&#xa;&#x9;y_max(&#xd;&#xa;&#x9;&#x9;layer_property( 'SamplePoints_9c8dcd70_f5c6_49fa_aa71_a07e4f850c8a', 'extent')&#xd;&#xa;&#x9;&#x9;), &#xd;&#xa;&#x9;&#x9;with_variable( &#xd;&#xa;&#x9;&#x9;&#x9;'x_max',&#xd;&#xa;&#x9;&#x9;&#x9;x_max(&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;layer_property( 'SamplePoints_9c8dcd70_f5c6_49fa_aa71_a07e4f850c8a', 'extent')&#x9;&#x9;&#x9;&#x9;), &#xd;&#xa;&#x9;&#x9;&#x9;&#x9; with_variable( &#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;'y_min',&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;y_min(&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;layer_property( 'SamplePoints_9c8dcd70_f5c6_49fa_aa71_a07e4f850c8a', 'extent')&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;), &#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;with_variable( &#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;'x_min',&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;x_min(&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;layer_property( 'SamplePoints_9c8dcd70_f5c6_49fa_aa71_a07e4f850c8a', 'extent')&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;), &#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;collect( &#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;make_point( rand(@x_min,@x_max),rand(@y_min,@y_max+ y(@canvas_cursor_point)*0 )),&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;make_point( rand(@x_min,@x_max),rand(@y_min,@y_max+ y(@canvas_cursor_point)*0 ))&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; )&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;)&#xd;&#xa;&#x9;&#x9;&#x9;&#x9;)&#xd;&#xa;&#x9;&#x9;)&#xd;&#xa;)"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" name="name" value=""/>
<Option name="properties"/>
<Option type="QString" name="type" value="collection"/>
</Option>
</data_defined_properties>
<symbol clip_to_extent="1" type="marker" name="@0@0" alpha="1">
<layer enabled="1" class="SvgMarker" pass="0" locked="0">
<prop k="angle" v="0"/>
<prop k="color" v="25,118,25,255"/>
<prop k="fixedAspectRatio" v="0"/>
<prop k="horizontal_anchor_point" v="1"/>
<prop k="name" v="E:/Downloads/christmas-tree.svg"/>
<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_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="300"/>
<prop k="size_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="size_unit" v="RenderMetersInMapUnits"/>
<prop k="vertical_anchor_point" v="1"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" name="name" value=""/>
<Option type="Map" name="properties">
<Option type="Map" name="name">
<Option type="bool" name="active" value="false"/>
<Option type="int" name="type" value="1"/>
<Option type="QString" name="val" value=""/>
</Option>
</Option>
<Option type="QString" name="type" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</layer>
<layer enabled="1" class="GeometryGenerator" pass="0" locked="0">
<prop k="SymbolType" v="Fill"/>
<prop k="geometryModifier" v=" combine( &#xd;&#xa;&#x9; make_regular_polygon( &#xd;&#xa;&#x9;&#x9;$geometry, &#xd;&#xa;&#x9;&#x9;make_point(&#xd;&#xa;&#x9;&#x9;&#x9;$x+100,&#xd;&#xa;&#x9;&#x9;&#x9;$y&#xd;&#xa;&#x9;&#x9;),&#xd;&#xa;&#x9;&#x9;3&#xd;&#xa;&#x9;),&#xd;&#xa;&#x9;make_regular_polygon( &#xd;&#xa;&#x9;&#x9;$geometry, &#xd;&#xa;&#x9;&#x9;make_point(&#xd;&#xa;&#x9;&#x9;&#x9;$x-100,&#xd;&#xa;&#x9;&#x9;&#x9;$y&#xd;&#xa;&#x9;&#x9;),&#xd;&#xa;&#x9;&#x9;3&#xd;&#xa;&#x9;)&#xd;&#xa;)"/>
<data_defined_properties>
<Option type="Map">
<Option type="QString" name="name" value=""/>
<Option name="properties"/>
<Option type="QString" name="type" value="collection"/>
</Option>
</data_defined_properties>
<symbol clip_to_extent="1" type="fill" name="@0@1" alpha="1">
<layer enabled="1" class="SimpleFill" pass="0" locked="0">
<prop k="border_width_map_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="color" v="255,0,4,255"/>
<prop k="joinstyle" v="bevel"/>
<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="no"/>
<prop k="outline_width" v="0"/>
<prop k="outline_width_unit" v="MM"/>
<prop k="style" v="solid"/>
<effect enabled="1" type="effectStack">
<effect type="dropShadow">
<prop k="blend_mode" v="13"/>
<prop k="blur_level" v="10"/>
<prop k="color" v="0,0,0,255"/>
<prop k="draw_mode" v="2"/>
<prop k="enabled" v="0"/>
<prop k="offset_angle" v="135"/>
<prop k="offset_distance" v="2"/>
<prop k="offset_unit" v="MM"/>
<prop k="offset_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="opacity" v="1"/>
</effect>
<effect type="outerGlow">
<prop k="blend_mode" v="0"/>
<prop k="blur_level" v="3"/>
<prop k="color1" v="0,0,255,255"/>
<prop k="color2" v="0,255,0,255"/>
<prop k="color_type" v="0"/>
<prop k="discrete" v="0"/>
<prop k="draw_mode" v="2"/>
<prop k="enabled" v="1"/>
<prop k="opacity" v="0.5"/>
<prop k="rampType" v="gradient"/>
<prop k="single_color" v="255,255,127,255"/>
<prop k="spread" v="2"/>
<prop k="spread_unit" v="MM"/>
<prop k="spread_unit_scale" v="3x:0,0,0,0,0,0"/>
</effect>
<effect type="drawSource">
<prop k="blend_mode" v="0"/>
<prop k="draw_mode" v="2"/>
<prop k="enabled" v="1"/>
<prop k="opacity" v="1"/>
</effect>
<effect type="innerShadow">
<prop k="blend_mode" v="13"/>
<prop k="blur_level" v="10"/>
<prop k="color" v="0,0,0,255"/>
<prop k="draw_mode" v="2"/>
<prop k="enabled" v="0"/>
<prop k="offset_angle" v="135"/>
<prop k="offset_distance" v="2"/>
<prop k="offset_unit" v="MM"/>
<prop k="offset_unit_scale" v="3x:0,0,0,0,0,0"/>
<prop k="opacity" v="1"/>
</effect>
<effect type="innerGlow">
<prop k="blend_mode" v="0"/>
<prop k="blur_level" v="3"/>
<prop k="color1" v="0,0,255,255"/>
<prop k="color2" v="0,255,0,255"/>
<prop k="color_type" v="0"/>
<prop k="discrete" v="0"/>
<prop k="draw_mode" v="2"/>
<prop k="enabled" v="0"/>
<prop k="opacity" v="0.5"/>
<prop k="rampType" v="gradient"/>
<prop k="single_color" v="255,255,255,255"/>
<prop k="spread" v="2"/>
<prop k="spread_unit" v="MM"/>
<prop k="spread_unit_scale" v="3x:0,0,0,0,0,0"/>
</effect>
</effect>
<data_defined_properties>
<Option type="Map">
<Option type="QString" name="name" value=""/>
<Option type="Map" name="properties">
<Option type="Map" name="fillColor">
<Option type="bool" name="active" value="true"/>
<Option type="QString" name="expression" value="color_rgb( rand(0,255),rand(0,255),rand(0,255)+ x(@canvas_cursor_point)*0 )"/>
<Option type="int" name="type" value="3"/>
</Option>
</Option>
<Option type="QString" name="type" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</layer>
</symbol>
</symbols>
<rotation/>
<sizescale/>
</renderer-v2>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerGeometryType>0</layerGeometryType>
</qgis>
......@@ -55,4 +55,9 @@ Below you will find an example of all styles currently in this repository. This
## Dynamic distance lines
<table><tr><td><a href="QML-files/dynamic_distance_lines/"><img src="Example_images/dynamic_distance_lines.png"></a></td></tr></table>
[Details of this Geometry Generator Style](QML-files/dynamic_distance_lines/)
\ No newline at end of file
[Details of this Geometry Generator Style](QML-files/dynamic_distance_lines/)
## Holiday Random
<table><tr><td><a href="QML-files/holiday_random/"><img src="Example_images/holiday_random.gif"></a></td></tr></table>
[Details of this Geometry Generator Style](QML-files/holiday_random/)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment