0

With QGIS 3, in order to limit the number of labels to my "town" table intersecting my area of interest polygon, I wanted to test the QGIS expression called: "overlay_intersects" via the settings / label / rendering menu. The syntax of the expression seems quite simple. But when I do an "overlay_intersects("my_table")" the expression is said to be invalid and my PostGIS table could not be loaded.

What is good practice with QGIS expression interface to load, point to a PostGIS table? Do I need to enter the server name? the name of the db? of the scheme? FYI, my common table is stored in 'admin' schema.

1
  • This is a bit unclear, are you trying to load a subset of point (and labelling this subset) or to label a subset a point (but loading all of them) ?
    – J.R
    Commented Nov 4, 2022 at 11:31

1 Answer 1

2

I understand you want to selectively show/hide the labels of your point layer, based on the spatial intersection with another polygon layer.

You can indeed use overlay_intersects(), but you need to use single quotes around the layer name, not double quotes

Let's note that it happens with any layers, not only PostGIS ones.

enter image description here

PS: and here is the error when using double quotes

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.