I'm trying to understand the closest_point function in qgis. For that, I created a polygon layer with two features, and through the Geometry Generator I intend to find the closest point between those two.
This is the expression I'm using, but it is not working:
closest_point(geometry (get_feature_by_id('closest', 1)), geometry(get_feature_by_id ('closest', 2)))
Can someone help me to find out why?