I am using QGIS 3.6.
I have raster of Europe map which I want to make a colored relief model. After duplicating the layer, used hillshade on backward layer and colored the upper layer interpolation > discrete then 65 % transparency. But the contour of color levels are not smoothed as the image shows.
Is there any way to do that?
Answer
In my case, I have a DEM with continue values, going from 100 to 103 meters. The spatial resolution is 0.25 x 0.25 degrees, defined in EPSG:4326. The DEM is styled with a discrete color ramp with three classes:
To smooth it, first I will make a raster algebra. Because I want a raster with only three values. I am using the following formula:
("testDEM@1" <= 100) * 100 +
("testDEM@1" > 100 AND "testDEM@1" <= 101) * 101 +
("testDEM@1" > 101 AND "testDEM@1" <= 103) * 103
Don't worry about its style, because it is an intermediate step:
For the smooting, I will use GRASS provider r.resamp.rst
algorithm, in two steps. First, we need the slope output to use it as a smoothing raster. So run the algorithm without smooth raster. Set the spatial resolution and delete row/column overlap and spline tension values:
From the outputs, I have removed all of them except the slopes raster:
Finally, run the GRASS provider r.resamp.rst
algorithm again, defining the slopes output as smoothing raster:
We just need the Resampled output. But now, we will style it with a linear interpolation instead discrete:
Now, you can use that raster with a 65% transparency over a hillshade:
External Reference:
No comments:
Post a Comment