I would like to improve the way arrows point to polygons when moving labels. I have some fields with unique numbers associated with each one. When the centroid of a polygon is outside the physical feature, the arrow will be misguiding. How can I improve my expression for the arrow to point to the perimiter of the polygons as illustrated with the blue circles?
CASE WHEN ("auxiliary_storage_labeling_positionx" IS NOT NULL AND "auxiliary_storage_labeling_positiony" IS NOT NULL) THEN make_line(centroid($geometry),make_point("auxiliary_storage_labeling_positionx","auxiliary_storage_labeling_positiony")) ELSE NULL END
Can anything be done to prevent the arrow appearing a second time if the centroid does not sit on the surface of the polygon as shown below?