<div dir="ltr"><div>Michel, <br></div><div><br></div><div>Thank you for your response, 
and for putting some good geometry generator examples out for others to 
learn from. (If others on the list haven't seen them, they are at: <a href="https://gitlab.com/GIS-projects/qgis-geometry-generator-examples" target="_blank">https://gitlab.com/GIS-projects/qgis-geometry-generator-examples</a>)</div><div><br></div><div>Your
 suggestion worked for me. I am mapping in EPSG 26915 (UTM Z15N), and 
since both SRS are in meters, I thought that similar values would work. I
 had tried to change the params in the functions by an order of 
magnitude, but obviously needed to go farther. <br></div><div><br></div><div>Thank you again for your help.</div><font color="#888888"><div><br></div><div>David.</div></font></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2020 at 5:05 AM Michel Stuyts <<a href="mailto:michel.stuyts@edegem.be">michel.stuyts@edegem.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="NL-BE">
<div class="gmail-m_6085111881193449476WordSection1">
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:gray" lang="EN-US">The numbers you need to use in “rand(-10, 10), rand(-10, 10)” depend on
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:gray" lang="EN-US">the CRS of your layer. I tested it with some demo data in EPSG:31370 and I got a similar result as you.  When I changed those numbers I got a better result.  After
 you changed those, you can play around with that 100 inside the generate_series, to get the result you want. For me the following gave a good result:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:gray" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">make_line(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">    array_foreach(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">        generate_series(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">            0, length($geometry), 300<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">        ),<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">        translate(<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">            line_interpolate_point($geometry, @element),<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">            rand(-0.5, 0.5),<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">            rand(-0.5, 0.5)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">        )<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">    )<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Courier New";color:gray" lang="EN-US">)<u></u><u></u></span></p>
<p class="MsoNormal"><i><span style="font-size:9pt;font-family:"Calibri",sans-serif;color:gray" lang="EN-US"><u></u> <u></u></span></i></p>
<p class="MsoNormal"><i><span style="font-size:9pt;font-family:"Calibri",sans-serif;color:gray" lang="EN-US"><u></u> <u></u></span></i></p>
<p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:gray">Michel</span><span style="font-size:9pt;font-family:"Calibri",sans-serif;color:gray"><br>
<br>
</span><span style="font-size:11pt;font-family:"Calibri",sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11pt;font-family:"Calibri",sans-serif">Van:</span></b><span style="font-size:11pt;font-family:"Calibri",sans-serif"> Qgis-user <<a href="mailto:qgis-user-bounces@lists.osgeo.org" target="_blank">qgis-user-bounces@lists.osgeo.org</a>>
<b>Namens </b>David Fawcett<br>
<b>Verzonden:</b> donderdag 16 april 2020 20:01<br>
<b>Aan:</b> qgis-user </span><span style="font-size:11pt;font-family:"Calibri",sans-serif" lang="EN-US"><<a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>><br>
<b>Onderwerp:</b> [Qgis-user] geometry generator - unexpected results<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US">I am trying to use a geometry ge</span>nerator to accomplish the "hand-drawn" line style.
<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Some great recent examples by:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Klas Karlsson<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://twitter.com/klaskarlsson/status/1249333750451879937" target="_blank">https://twitter.com/klaskarlsson/status/1249333750451879937</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Hamish:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://polemic.nz/2019/11/18/foss4g-qgis-geometry-generators/" target="_blank">https://polemic.nz/2019/11/18/foss4g-qgis-geometry-generators/</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I am using the code below from the blog post by Hamish in QGIS 3.12:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<pre><code>make_line(<u></u><u></u></code></pre>
<pre><code>    array_foreach(<u></u><u></u></code></pre>
<pre><code>        generate_series(<u></u><u></u></code></pre>
<pre><code>            0, length($geometry), 100<u></u><u></u></code></pre>
<pre><code>        ),<u></u><u></u></code></pre>
<pre><code>        translate(<u></u><u></u></code></pre>
<pre><code>            line_interpolate_point($geometry, @element),<u></u><u></u></code></pre>
<pre><code>            rand(-10, 10),<u></u><u></u></code></pre>
<pre><code>            rand(-10, 10)<u></u><u></u></code></pre>
<pre><code>        )<u></u><u></u></code></pre>
<pre><code>    )<u></u><u></u></code></pre>
<pre style="margin-bottom:12pt"><code>)</code><u></u><u></u></pre>
<pre><code>Here is an image of what the results look like: <a href="https://github.com/fawcett/examples/blob/master/lines.png" target="_blank">https://github.com/fawcett/examples/blob/master/lines.png</a></code><u></u><u></u></pre>
<pre><code>The line geometries are in blue, and the geometry generator output is in black. </code><u></u><u></u></pre>
<pre style="margin-bottom:12pt"><code>Can anyone suggest what is going wrong?</code><u></u><u></u></pre>
<pre style="margin-bottom:12pt"><code>Thank you, </code><u></u><u></u></pre>
<pre><code>David.</code><u></u><u></u></pre>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>

_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>