I am using a Geometry Generator symbol layer to draw lines between grouped points. I am grouping points based on two fields letter and number, which I concatenate to make the groups (GeoPackage download).
Current expression:
make_line(
array_agg( -- gather results into array
expression:=$geometry,
group_by:=letter||number -- concatenate fields to make groups
)
)
make_line accepts an array of Point geometries, hence using array_agg.
The expression works and draws the lines, however, it draws a line per point. So, for a group of 4 geometries it overlays a line 4 times.
It is difficult to visualise but there is a discernible difference in colours between these lines using the Screen feature blending mode.
How can I adapt my expression to prevent this?

idand then return a null geometry for any point that is not first in a group. But that would probably be a rather elaborate expression. – Matt Feb 24 '22 at 17:16