I'm using QGIS 3.16 Hannover under MacOS 10.13 environment. I've got two polygon shapefile layers: 'LIC' and 'ZEPA'. Some polygons (name, code & geometry) are present in both layers and I want to identify them by adding a new field to the layer 'ZEPA' with the value "yes" if that feature is also present in the other layer. I've tried in the field calculator the function overlay_equals(). My try has been

    array_to_string(overlay_equals('LIC', "yes"))

But it returns the new field empty (instead of "yes") for those equal features. What is wrong?

  • Did you also try 'yes'? Feb 28, 2021 at 15:55
  • I did, but it returns NULL for all features.
    – jpinilla
    Feb 28, 2021 at 15:57

1 Answer 1


The following code actually does what I want:

    WHEN overlay_equals('LIC') = 1 THEN 'yes'

Another option could be obtaining a 0/1 return, setting an integer field with the following expression:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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