I am experiencing some issues eith the Geometry Generator (GG) in QGIS (I tested it both on 3.28.7 and 3.34.5 versions).
I had previously created a point layer with a double symbology, a point and a linestring created by the GG. The layer and the QGIS project share the same CRS projection.
The expression used to create the lines is this (similar to the one suggested here):
collect_geometries(
array_foreach (
overlay_nearest(
'layer_name',
$geometry,
max_distance:=30000,
limit:=-1
),
make_line (
$geometry,
@element
)
)
)
and it created lines connecting the points within a certain distance (in the provided example 30000 map units , i.e. 30 km). This worked well until some times ago when I reopened the project and realized this method is not working anymore. The issue I have encountered is twofold:
- if I write the expression in the GG of the point layer, nothing happens. But if I duplicate the layer, lines are drawn;
- the GG units are set on 'map units', so working with projected reference systems they should be meters, and this worked well in the past. Now it seems there is no correspondence between the GG units and the effective distance among points, so to make some lines appear I have to arbitrarily increase the
max_distance
, which makes no sense to use this expression;
I tried to create new projects and point layers as well but I could not find any solution.