In a by now fairly old post I described how to sample raster values at point location in QGIS. The method I described used the ‘Point Sampling Tool’ addon. However, the function creates a new point layer, which only contains the values extracted from the raster layer. None of the fields in the original point layer is copied to the new one. It is possible to join the attribute table of the new vector point layer with the original attribute table afterwards using a spatial join as explained in that post. However, this will not work if your point data includes points with exactly the same coordinates.
Since I wrote that post, QGIS has come a long way. It now for example includes by default a processing toolbox which provides an easy and convenient interface to hundreds of functions from e.g., GRASS GIS and SAGA GIS. One of them will let you sample raster values at point locations too. Like the point sampling tool described earlier, it will create a new point layer with a new column for each raster layer sampled. The difference is that it will also copy over the columns that were already present in the original point layer.
The function I am talking about is the Saga function ‘Add grid values to point’. For this function to be available, you must have installed Saga GIS and than enable it in the processing options. To do this, go to: menu: processing – options and configuration – providers – SAGA and than select the Activate box. In Windows you will also have to define the path of the directory to which you installed saga.
After that, open the processing toolbox (go to menu: view – panels – toolbox) and look for the function ‘Add grid values to points’ in: SAGA – Shapes – Grid (easiest way to find that function is to start typing the name of the function in the search box). A new window will open:
Now select your point layer (1), one or more grid layers (2) and the interpolation method (3). If you simply want the grid values at point location, use the default ‘nearest neighbor’ method. Last, give the path and name of the output shapefile (alternatively, the function will create a temporary file, which you can than save using the save as option in the file menu.