How can I display labels for line features in a QGIS line layer, where the label should appear outside a polygon if the line feature is inside the polygon, and otherwise appear as it is? I have activated the "name" field for labeling the line features.enter image description here
difference ( $geometry, buffer ( aggregate( 'polygon', 'collect', buffer ($geometry,15) ), 0 )) i tried the above expression but not working.
