I tried to make an hillshade and a slope map from a DTM using QGIS but the result shows some artifacts.

As you can see in the picture there is a grid texture in the hillshade and the slope map.

hillshade and slope

I downloaded the DTM files from:


The DTMs have the UTM-WGS84 coordinate system and a resolution of 10m. Every DTM is a GeoTIFF floating point 32 bits with a TFW associated.

I used the VRT builder to generate e virtual raster from the DTMs, then I used Warp to reproject the VRT into the same coordinate system of the original DTMs but using bilinear interpolation as "resampling method". I used the reprojected raster to make the hillshade but the grid texture was still there. Then I changed the "output raster type" to Int32 in the Warp tool, and I used the output to generate another hillshade but the texture was still clearly visible.

Do you have any idea why this is happening?

  • Is aldo_tapia's output for slope considered adequate? It seems like the grid-texture in the original post has just been converted to a contoured-texture. I am getting similar output - the slope raster appears highly contoured - and I can't help but feel this contouring of the slope values is an artifact. Nothing that I have tried appears to eliminate this effect; including - warping (reprojecting) the DEM so that the vertical units match the horizontal units (as suggested in gis.stackexchange.com/questions/79803/…) - warping (reproj
    – Ethan
    Apr 17, 2018 at 20:28

1 Answer 1


The problem is because the DTM has a high-resolution pixel size when data (in my opinion) doesn't have the same resolution is some areas.

For example, direct hillshade raster:

enter image description here

Check pixel values (using Raster values to points over the hillshade ugly raster):

enter image description here

That's why look so ugly hillshade or slope outputs. You need to aggregate to obtain a better look output. I'm a R user for mostly all raster processing, so you can use a custom R script inside QGIS to work with R and raster package. Also, Aggregate function from SAGA toolbox only applies by sum, min or max, not mean.

In this case, aggregate by mean could be an excellent choice:

##Factor=number 2
##Output=output raster
Output=aggregate(x=Input,fact = Factor,fun=mean)

Check documentation to know about parameters and function description. After this, use it in QGIS:

enter image description here

With output raster, compute hillshade:

enter image description here

And slope:

enter image description here

  • Thanks for the reply but I don't understand your explanation about pixel size and data resolution. Anyway don't you loose resolution if you aggregate together the DTM cell values?
    – edorap
    Feb 14, 2018 at 22:56
  • @edorap you loose resolution. That's why I wrote "for a better look output", but values are modified and cell size in now 2x times the original value.
    – aldo_tapia
    Feb 15, 2018 at 11:14
  • I obtained a result close to yours using gdalwarp and reprojecting on a cell twice the original one with bilinear interpolation, but I was looking for a solution that preserves the original raster resolution.
    – edorap
    Feb 15, 2018 at 13:41
  • The only solution would be reprojecting outputs to original resolution
    – aldo_tapia
    Feb 15, 2018 at 13:45
  • 1
    strictly speaking, you don't loose resolution because, as mentioned in the answer, the actual resolution is coarser than the pixel size. You can resample a 30 m SRTM DEM at 1cm pixel size, but this will nit improve its resolution (= ability to distinguish two elements of different values at a given distance.) You can of cours interpolate, but then you mke some assumption on the topography. In your case, the interpolation was a nearest neighbour, which is a very bad assumption for topogrgraphy.
    – radouxju
    Jul 4, 2019 at 7:02

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.