I am trying to perform a raster interpolation of a contour shapefile with the intent of eventually creating a DEM. No matter what I try, I get NAN values, and nothing is working to fix it. I can't even begin to understand why this is happening, I would love to provide more detail if I had even the slightest idea what the problem was... I've tried changing the cell size, trying points, structure lines and break lines as the type of file, I've tried doing it as a TIN and IDW, changing the coordinate system to UTM (as suggested in another post)... Every possible solution that I can think of.

I've also tried going the grid interpolation route instead of the typical raster interpolation route, no dice. I get a different error with that route though...

enter image description here

I'm clutching at straws, but my guess is that something is wrong with my shapefile, though I can't figure it out. Any suggestions would be appropriated, though I am pretty incompetent with Python if that is the solution...

  • Have you tried adding the whole file path of a0000000b into the gdal_grid command in the text box? You can click the yellow pencil to edit this command. Nov 8, 2016 at 17:48
  • Just tried it and it gave the same error. Thanks for trying.
    – Bailey
    Nov 8, 2016 at 17:55
  • Could you upload an example contour file you are using? Nov 8, 2016 at 18:13
  • 3
    Rename the input file. There is a space in the file name that is messing stuff up!
    – underdark
    Nov 8, 2016 at 18:14
  • 1
    Have you tried exporting the layer from the gdb you are using? You keep mentioning a shapefile, but your input is not actually a shapefile. Looking at the gdal_grid command it is looking for a layer named a0000000b within the a0000000b.gdbtable file. If I'm interpreting the input line correctly the actual layer name within the gdbtable is Contours_Clip which is of type MultiLineString. Exporting that layer to a shapefile and running the processes again should work - certainly does on 2.14.8 (LTR) when tested.
    – Phil G
    Nov 10, 2016 at 14:42

2 Answers 2


I had the same "Nothing But NAN values using raster interpolation in QGIS" problem today. I discovered that I had created my altitude points layer in a different SRC than the rest of my project. So I right clicked on it, save as, and selected the SRC of my project (EPSG:3857). Then in Raster > Interpolation > Interpolation I picked this source layer and it worked.


You need to change your data into a projected CRS like UTMs. If your point data are in (for example) radian degrees lat/long, but your elevations are in meters above sea level, you will get the NaN error. The easy solution is to right click your csv or shapefile, then Save As..., give the file a new name and select a projected CRS like UTM. Create your interpolation from the reprojected file.

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.