I wonder how to calculate statistics (in my case average) of one point layer field (let say B layer) and assign them to each point of A layer. Statistics should be calculated from 3 nearest B layer points that are closest points to the point from A layer. My software is QGIS 3.4.15.
For the above example:
- Let say that I want to calculate avg of 'Price' attribute that contains B layer.
- The AVG(B2.Price, B3.Price, B4.Price) should be assigned to point A1 of A layer.
- The AVG(B5.Price, B6.Price, B7.Price) should be assigned to point A2 of A layer.
- The AVG(B5.Price, B8.Price, B9.Price) should be assigned to point A3 of A layer.
- It would be great to assign also the distance to the 3rd point.