<div dir="ltr"><div>Hi, <br></div><div><br></div><div>I am working through an exercise to figure out the best way to represent some wooded areas in a map that I am making. <br></div><div><br></div><div>The current iteration uses geometry generators to create slightly randomized points to fill the polygons that represent wooded areas. I based it off of the great examples at <a href="https://impermanent.io/2017/05/05/generative-pseudo-random-polygon-fill-patterns-in-qgis/">https://impermanent.io/2017/05/05/generative-pseudo-random-polygon-fill-patterns-in-qgis/</a> And, it works great!</div><div><br></div><div>After looking at it a while, I want to introduce some variability in the size of the point symbols too. <br></div><div><br></div><div>I have two ideas on how to do that: <br></div><div><br></div><div>The first one is to create and populate an attribute for each point feature, and then apply symbology rules based on that value. The challenge is that right now, my custom function is returning multi-point features, so all of the points within a forest poly would have the same attribute.</div><div><br></div><div>I am currently pursuing the second one. That strategy is to use the same altered grid of points, and then buffer each point. I am having a hard time figuring out how to return a layer with several multi-polygon features created by buffering the points. <br></div><div><br></div><div>In this example, "buffer" is not defined, so the expression is invalid.</div><div><br></div><div>  for xOff in range(countX+1):<br>    for yOff in range(countY+1):<br>      ptX = xMin + xOff*(xInterval) + rand * random.uniform(0,xInterval)<br>      ptY = yMin + yOff*(yInterval) + rand * random.uniform(0,xInterval)<br><br>      pt = QgsPointXY(ptX,ptY)<br>      point = QgsGeometry.fromPointXY(pt)<br>      <br>      <br>      if feature.geometry().contains(point):<br>          sym = buffer(point,200.0,10)<br>          #points.append(pt)<br>          bufs.append(sym)<br>    <br>  return collect_geometries(bufs)</div><div><br></div><div><br></div></div>