Wednesday, 21 February 2018

qgis - How to refer to another layer in the field calculator?


Is there a way to select an attribute from a polygon layer and insert the value into a virtual field of a point layer using "within" in the field calculator?


CASE
WHEN within($geometry, geometry_polygon) THEN attribute_polygon
END

enter image description here




Answer



Spatial joins are available in the field calculator after installing the refFunctions plugin.


geomwithin(targetLayer,targetField)

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...