When working with rasters, we have much less options in GeoServer, just like in QGIS. For singleband rasters, like our DEM, we can create a color ramp on which GeoServer interpolates the values of the raster data. We can define breakpoints on the color ramp with colors and raster values. In order to do this, first we need the minimum and maximum values of our SRTM DEM:
- Open QGIS, load the SRTM DEM which is used in GeoServer, and note down its minimum and maximum values. We can use Properties | Style with the accurate min/max values, or we can read out the values from the Metadata tab.
- Create a new style in GeoServer, and name it appropriately.
- Generate a default raster style, and save the template. Open it again, and ...