I have two layers, one with more specificity applied than the other (territorial subdivision within subdivision). There are unique keys fields that are equal between both layers. For any feature, it returns null or the correct value consistently for the same features. I rechecked that the key fields are exactly the same strings.

  when geomwithin('dom_admbnda_adm2_2020-iso', 'adm2_pcode') = adm2_pcode 
    then geomwithin('dom_admbnda_adm2_2020-iso', 'ISO3306-2') 
  else -1

Maybe I'm misunderstanding something, but isn't geomwithin supposed to behave like a sql join?

1 Answer 1


Check your CRS, if the coordinate systems differ, the function will not work right. All layers must be one the same coordinate system.

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.