[GIS] Show alternating contour lines

layerslineqgisvector

Is it possible to show only every other contour line? And how do you do that?

(I'm new to QGIS Lisboa 1.8.0, but even newer to QGIS Dufour 2.0.1, but have used ArcGIS a bit a while ago, and also some ArcView 3.x earlier. But I'm now using QGIS Dufour 2.0.1. for this).

Best Answer

If you have a contour lines layer with associated elevation attribute, you can query the contour lines in reference to the elevation values. More in detail, you could define a rule-based style in Vector properties --> Style in order to query the elevation values you are interested in.

For instance, suppose you have contour lines with equidistance 5 m and you want to show only contour lines with equidistance 10 m. A possible query in a rule-based style could be:

"elev" % 10 = 0

Only the contour lines which match this expression (elev value which ends with 0) will be filtered and consequently shown. Instead, contour lines with elev value which ends with 5 will be hidden (but they are always there).