Tutorial: Create a groundwater level map from borehole data and a DEM

9. Sample DEM elevation at boreholes

We're now going to sample the DEM elevations at the borehole locations.

1. In the Processing Toolbox choose go to Raster analysis | Sample raster values


2. In the dialogue choose boreholes_clipped as Input layer and DEM as Raster layer. For Output column prefix type  Z_. Save the Sampled output layer to the GeoPackage with the name Boreholes_Z.



3. Click Run. Click Close to close the dialogue after processing.

4. Check the attribute table of the  Boreholes_Z layer.

You can see that the Z_1 field has been added.

In the next section we're going to create a scatter plot of the reported elevation and the Z value from the DEM.

Note that if you want to sample values from multiple vectors and rasters you need to use the Point Sampling Tool plugin, which was used in the video.