In QGis 2.x, I could rotate a point symbol towards the nearest geometry of a certain kind by using:

geomnearest('featuretype', 'BEARING')

This however does not work in QGIS 3.x, and I cannot find out what rotation command to use.

1 Answer 1


geomnearest is a function of the refFunctions plugin, search it in the QGIS extension menu and install it, it's available in QGIS 3.x.

see Plugin page :


Retrieve target field value from the nearest target feature in target layer

  • I have the QGIS 3.x compatible version of refFunctions installed, but that does not help. Jul 21, 2019 at 18:36
  • 1
    You have already reported the issue, seems the developper works on the migration to the core (link] Jul 21, 2019 at 20:19
  • My question is how to get to the result needed as geomnearest does not work, at least not in the way it did before. I would be very thankful for any help in how to achieve this. Jul 22, 2019 at 5:56
  • It was not clear for me in your question, hence my answer thinking you hadn't installed the plugin. Jul 22, 2019 at 7:26
  • Does anyone have experiences regarding if geomnearest should work now in Qgis 3.x as it did through the refFunctions plugin in Qgis 2.x . I have not found out how to achieve the above geomnearest(targetLayer,targetField) kind of result thorugh Qgis 3.x and the new refFunctions plugin. Jun 26, 2021 at 10:31

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.