I clipped a big DEM to a smaller one to reduce the DEM to the area I need. Now i want to show the different heights in different colors. I did the contour lines. Due to the clipping, the contour lines will give me, using the process of "Line to Polygon", some polygons which have a flat side. I know this is because the contour lines are not closed. So how do i close them without doing it by hand following the boundaries of my clipping mask?

  • Could you add a screenshot?
    – Bera
    Commented Jul 4, 2017 at 13:35

1 Answer 1


If you want to visualize different heights in different colors, I suggest that you don't use countour lines but instead apply a raster style with "single-band pseudo-colors" (you can then chose continuous or discrete color classes), see Certain Color for Value Range for a more detailed answer.

As a remark, if you have the clipping mask boundaries, you can merge it ( Merging multiple vector layers to one layer using QGIS?) with your contour lines before running the line to polygon tool.

  • 1
    @Sebastan you may also see here.
    – mgri
    Commented Jul 4, 2017 at 14:37
  • 1
    @mgri Nice answer there. I've added the link in my post. Maybe this could be considered as a duplicated, but in fact the original question was about vector rendering and my main suggestion is to reconsider the way to think about it, but line siplification (if the DEM is coarse) could be a reason for using (simplified) countour lines.
    – radouxju
    Commented Jul 4, 2017 at 14:43
  • I suggested that answer because it helps to understand how to apply your tip. However, I think it should not be marked as a duplicate since my answer is oriented to a specific interpolation method (classification using ranges), while the OP may not need that. Thus, your answer is appropriate here and it should solve the OP's issue.
    – mgri
    Commented Jul 4, 2017 at 14:49

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.