[GIS] QGIS 2.6 – Point Sampling Tool plugin producing empty shapefile

demqgisqgis-2qgis-pluginssampling

I use a DEM file (*.tif) and a points layer. My need is basic : getting the Z value for each point by extracting them from the DEM. Both layers correctly opened with QGIS 2.6. The DEM returns a Z value if I click with the « i » button (informations).

'Point Sampling Tool' plugin is set as below :

  • Layer containing sampling points : my points layer
  • Layers with fields/bands to get values from : I select my DEM, which appears in the list as : 'EUD_CP_DEMS_3500015000-AA-86 : Band 1 (raster)'
  • Output point vector layer : output.shp
  • Add created layer to the TOC : activated

The following message in still issued in the 'Status' part :

Complete the input fields and press OK...

I don't undertand what to do with this message. Anyway, I validate the dialog and get my output.shp added to the TOC properly… BUT the attributes column is empty (NULL values). I have the right number of lines matching the number of points in my source points layer.

I can't find any further help on the Web. Such clear tutorials do not show any difficulties.

Is my DEM format a possible issue?

Best Answer

You need to highlight all the attributes you want to appear in the output from the "Layers with fields/bands to get values from" list. If you have not clicked on 'EUD_CP_DEMS_3500015000-AA-86 : Band 1 (raster)' so that it is highlighted then you will get nothing. This is what the message:

Complete the input fields and press OK...

means (I think "select" would have been a better choice of instruction than "complete"). You can select many fields from many rasters and fields from polygons and your original points too. If you do not select any fields, you will get nothing out. HINT: you can rename the fields in the output by using the Fields tab.

Related Question