1

I have a point that I drew on a tiff DEM file in QGIS. The point doesn't have any information in the attribute table except an ID of 1.

How can I make it copy the raster information based on the location it is on the DEM file?

For example, take/copy the height attribute from the location it is based on the raster/DEM file.


The closest solution seems to be the Point Sampling Tool plugin in QGIS. It extracted the values as needed.

  • 1
    Processing toolbox -> GRASS -> Vector tools -> v.sample :) – Gabor Farkas May 2 '16 at 16:56
  • Hmmm... This error shows up, any ideas? Oooops! The following output layers could not be open Output vector layer: E:/QGIS projects/2.5.2016/vsample.shp The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm Checking the log information might help you see why those layers were not created as expected This algorithm requires GRASS to be run. A test to check if GRASS is correctly installed and configured in your system has been performed, with the following result: GRASS seems to be correctly installed and configured – birdybird03 May 2 '16 at 17:01
  • 1
    Whitebox GAT -> Statistical Analysis toolbox -> Extract Raster Values at Points... Will allow you to assign fields to the points in a vector from one or more raster files in one operation. – WhiteboxDev May 2 '16 at 17:02
  • 1
    You are supposed to post answers as answers. I mean, the edit part in your question should have been written in the answer box. – Andre Silva May 2 '16 at 18:48
2

You could try to vectorize that raster area (first clip it, then vectorize) and then merge the resulting shapefile with the vector point you began with.

  • @BlueBird03 If this is the answer that helped you the most then I think that you should accept it. – PolyGeo Oct 8 '18 at 9:38
4

You could to use Processing Toolbox:

SAGA >> Shapes - Grid >> Grid Value to Points

  • 1
    That's the way I'd do it. I would not vectorize the raster and intersect as the other answer says.. for any decent sized raster this would take a long time and possibly overflow the maximum size limit for a shapefile or other vector storage; although vectorize and intersect would work with a small raster sampling the points is the best way. – Michael Stimson May 3 '16 at 0:02
  • 1
    @BlueBird03 If this is the answer that helped you the most then I think that you should accept it. – PolyGeo Oct 8 '18 at 9:39

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.