5

I'm trying to create hillshades from Czech elevation data (Fundamental Base of Geographic Data of the Czech Republic (ZABAGED®) - altimetry - grid 10x10 m) - a demo files is available here: http://geoportal.cuzk.cz/UKAZKOVA_DATA/GRID10x10.zip

I combine some of their txt files using some bash scripts and then create a GeoTiff using gdal_grid. The resulting GeoTiff looks like this when imported in QGIS:

enter image description here

As a next step I'd like to create hillshades using the Raster->Analysis->DEM and the result looks like this:

enter image description here

I made sure to use the bilinear option when rewarping the raster and already tried basically all available algorithms of gdal_grid.

Not sure if this is relevant, but that's how the hill shade TIFF looks like when opend in OS X Preview:

enter image description here

What's the source of these artifacts and how to avoid them?

4
  • Possibly related to gis.stackexchange.com/questions/78351/…
    – Chris W
    Mar 23, 2015 at 21:01
  • I'm not sure if it's really related to problem with warping - in fact it also occurs when I do not warp the raster files
    – rist
    Mar 23, 2015 at 21:09
  • When I do hillshade on whatever DEM, I always get "some" grid artefacts, but not to be compared with what you get there. As hillshade for me is only eye-candy for maps, I use the SAGA simple filter on the DEM beforehand, which eliminates a lot (but not all) artefacts. I have no idea what the reasons for these patterns are.
    – Bernd V.
    Mar 23, 2015 at 22:02
  • 1
    Hillshade looks made of integers. Make sure when converting from text the output is floating point raster
    – FelixIP
    Mar 24, 2015 at 1:19

2 Answers 2

5

Use QGIS Vector to Raster to convert the shapefile points into raster, I will try to explain why:

Using the GDAL_Grid utility has interpolated incorrectly, that is where the stepping is coming from, you just don't see it in a black to white renderer. This is how I see the sample data interpolated using GDAL_Grid in Esri: enter image description here Note the Horizontal banding.

Using parameters:

gdal_grid -ot float32 -of GTIFF -zfield Z -l grid10x10 -outsize 517 422

enter image description here

The interpolation works better (517 by 422 was calculated from the extent divided by 10) producing the hillshade:

enter image description here

Note: the banding is better but can still be seen.

The banding is being introduced by the GDAL_Grid program! Using QGIS Raster::Conversion::Rasterize (Vector to Raster), fill in cell size so that it's not interpolated and then hillshade from Raster::Terrain Analysis::Hillshade: enter image description here

As the image is not interpolated there are points that aren't filled in and may need to be addressed with a focal mean. After you sort that out it should be fine!

2
  • hi thanks - yes using rasterize instead of grid brings much better results. But I only succeed in rasterizing when using a small output image (-ts 517 422) which results in pixelated DEMS. When using larger values for -ts I basically get a black image with some white dots.
    – rist
    Mar 24, 2015 at 7:28
  • That's right, there's no interpolation. You must specify exactly the point spacing and then try to fill the cells that have no points using a raster fill, but that is worthy of a new question. Mar 24, 2015 at 21:03
0

I would suggest you look at using SAGA Raster Creation tools in the Processing toolbox. You might need to turn them on in your settings. These tools don't show such horrible artifacts.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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