Styling raster data

First, let's see our elevation model, opened in the second chapter. As we discussed before, this is the simplest rendering option that QGIS has to offer--a single-band grey representation. It simply clamps the raster values to a byte (0-255), and renders the result as an 8-bit texture. If we open the layer's properties and navigate to the Style tab, we can see the few options needed for such a visualization. QGIS needs a band, which is unambiguous as we have only one band, and the Contrast enhancement set to Stretch to MinMax.

Let's add some colors to this elevation model, and see how we can render it as a 24-bit image. For this, we have to change Rendering type to Singleband pseudocolor. This mode has a lot of options ...

Get Practical GIS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.