[Qgis-user] Labelling certain contours

Neumann, Andreas a.neumann at carto.net
Thu Aug 18 06:41:37 PDT 2016


Hi Lester/Carlos, 

Even better would be to use a rule-based label (available since 2.14 I
think). 

With rule-based labeling it is most likely a bit faster, since QGIS
doesn't have to deal with all of the contours that are not a multiple of
1000. 

In your case, with the CASE statement it still has to process every
contour line. 

Andreas 

On 2016-08-18 15:31, Lester Anderson wrote:

> Thanks Carlos, that worked fine
> 
> On 18 August 2016 at 14:11, Carlos Cerdán <sig.upagu at gmail.com> wrote: Hi Lester.
> 
> I think you're close to do it. Try this label expression:
> 
> case when "ELEV"%1000=0 then "ELEV" end
> 
> Good luck
> 
> Carlos
> 
> 2016-08-18 7:49 GMT-05:00 Lester Anderson <arctica1963 at gmail.com>: 
> Hello,
> 
> Is there a simple way of labelling only certain contours rather than all?
> 
> I have set up bathymetry styling for thick contours (1000) and thin (100):
> "ELEV" % 1000 = 0  (thick)
> "ELEV" % 1000 <> 0 (thin)
> 
> I would like to label only the 1000 contours, i.e. conditional labelling.
> 
> Thanks
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
> 
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
 _______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 

  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160818/35a510c7/attachment.html>


More information about the Qgis-user mailing list