I need to sample the elevation at number of predefined location given in CSV format (but could convert to shapefile if needed). My input data is a shapefile of contour lines.

Is it possible to sample the elevation directly? Possibly having to converting the contour to a DEM or other sort of raster.

I've seen many questions regarding the opposite transformation (points to contour) but I can't seem to have been able to find this one.

1 Answer 1


For what you are after, some GRASS modules might be helpful. These can be found in menu processing > processing tool box:

enter image description here

To compute a raster dem I made good experience with the grass module v.surf.rst. This is a bit tricky (lots of parameters...), but the background is described in detail by the authors MITASOVE & HOFIERKA in this paper: http://www4.ncsu.edu/~hmitaso/gmslab/papers/MG-II-93.pdf

Once having your DEM ready, you can use v.sample so sample your DEM at given locations. For this you first need to make point locatins from your csv. Use the QGIS text file import capabilities for this:

enter image description here

Use these points as input to Grass-module v.sample. This creates a new points file with an additional attribute containing your sampled raster values. Right click on it in the layer tree and Save as... csv.

For further use you can put this all together with the graphical modeler.

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.