I am working with a DEM and got a GPS line of my working area. I converted the GPS line into single measurement points. Now I want to compare each of these GPS points with the corresponding elevation value of my DEM.

enter image description here

I tried to do this manually by hand but working with several thousand points makes it nearly impossible to accomplish that. I thought about calculating average values of the GPS values within a DEM cell, but what if the elevation differs significantly within that specific cell?

Is there a tool either in ArcGIS or QGIS which can help me comparing my values?


Following the answer provided by @humperderp you will now have two point layers:

  1. the original points
  2. the new points containing the raster value.

Perform a spatial join (available with either QGIS or Arc) on those two layers, which will provide you with two columns for each point: the original GPS value and the raster value.

Subtract the value of one column from the other and Voila; the difference between the GPS and raster value!

| improve this answer | |
  • I'll just add that the subtraction can be done with the Field calculator, in case that is unclear. – humperderp Jul 7 '19 at 11:13
  • Thanks for your advice. Unfortunately spatial join does not work in ArcGIS as well as in QGIS. I tried it several times but all I got are "Null"-Values with every attempt. Is there another way? have to say, that both of my datasets are qhuite large. My GPS dataset contains 20 000 single points and my DEM nearly several million. Spatial join does not work with a reduced DEM neither. Is there another posibility? – MAT Jul 8 '19 at 21:42
  • Both the point and raster layer must be in the same coordinate reference system (aka "projection") forthe spatial join to work correctly. It is not enough that they are coincidental when displayed on your monitor. – Stu Smith Jul 9 '19 at 21:01
  • If you use v.what.rast.points from GRASS GIS (available in the QGIS processing toolbox) the raster values on each GPS point are added directly into the attribute table of the GPS points, thus avoiding the spatial join step, if you weren't able to figure it out. – humperderp Jul 17 '19 at 13:33

With QGIS you can use the Point sampling tool plugin to retrieve the value of the DEM raster cell on which each GPS point is situated. Alternatively, v.what.rast from GRASS GIS and Add grid values to point from SAGA GIS should be available in the QGIS processing toolbox. Here is a brief guide for using all three: https://tutorials.ecodiv.earth/toc/sample_raster_in_qgis.html

In ArcGIS you have the Extract values to points tool. The reference for this is here: http://desktop.arcgis.com/en/arcmap/latest/tools/spatial-analyst-toolbox/extract-values-to-points.htm

Lastly, here is a question explicitly concerned with open source approaches to the problem, with a lot of different alternatives in the answers: Extracting raster values at points using Open Source GIS?

Extracting the raster values to the points using one of these tools should then allow you to compare the elevation values to any other attributes you might have stored in the GPS points.

| improve this answer | |
  • Hey, thanks for your reply. I've already done what you described. With this method I extracted the DEM values (represented by the red dots in my sketch). But now I am looking for a method to compare these extracted raster values (from the DEM) with each GPS point I converted from a line within a DEM cell. Since the GPS line crosses several cells from the DEM and contains also several single measurement within each cell, it is barely impossible to do this point for point manually. – MAT Jul 7 '19 at 1:48
  • I thought about something like this for example: A tool which takes every single GPS value (black dots) and compare (substract) it with the corresponding DEM value (red dot) within each DEM cell automatically. – MAT Jul 7 '19 at 1:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.