I have two feature classes: point and polygon. The purpose is to make geometrical relations between them. For instance, if points are within a polygon then automatically make the relation between polygon and point and to see all polygon information in point attributes, but I don't have identical ID's.

  • 1
    Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works. Thanks.
    – PolyGeo
    Jun 21 at 8:50

2 Answers 2


You can use this expression:

array_to_string (
   overlay_within (

This is for "completly within", but there are other "overlay" expressions, see https://docs.qgis.org/3.22/en/docs/user_manual/expressions/functions_list.html#overlay-contains.


Does "Join by localisation" not fit your needs? Select "point layer" as source, "intersect" as predicat and "polygon layer" as layer to join.

  • No, because it creates a new vector layer which is an extended version of the input one. It needs to be in the same feature with automatic updates. Jun 21 at 9:39
  • 2
    you can create a new field (virtual or not) in your point layer with the expression: aggregate(layer:='Polygons_layer',aggregate:='concatenate', expression:="Attribute_Polygon_you_want", filter:=intersects($geometry, geometry(@parent)))
    – katagena
    Jun 21 at 10:12
  • Thanks a lot, it really worked for the points on update! could you please tell me how to do the same for lines if they are within(or completely within) the polygon? Jun 22 at 6:14

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.