Re: [Qgis-user] Labelling certain contours
Hi Lester: I'm working with 2.16 and rule labels works fine. Before Andreas' advice, I've been working with expression "case when...". Not more, rules based is better... 2016-08-18 10:08 GMT-05:00 Lester Anderson : > I have QGIS 2.10 (the CASE method works there) and 2.12 here at the > moment. 2.12 shows the rule-based labelling but it does not work with > the rule "ELEV" % 1000 = 0 even though it clearly finds all the > elements when it is tested. > > Does it work properly in 2.14 and later then? I can try later on at home. > > Cheers > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Labelling certain contours
I have QGIS 2.10 (the CASE method works there) and 2.12 here at the moment. 2.12 shows the rule-based labelling but it does not work with the rule "ELEV" % 1000 = 0 even though it clearly finds all the elements when it is tested. Does it work properly in 2.14 and later then? I can try later on at home. Cheers ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Labelling certain contours
Thank you very much Andreas! You're right. I've just tried rule-based label with a large contours layer and difference in time consumption is notable. So, in Lester's case, rule would be just: "ELEV" % 1000 = 0 Regards Carlos 2016-08-18 8:41 GMT-05:00 Neumann, Andreas : > 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 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 : > > > 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@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@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@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@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Labelling certain contours
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 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 : > 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@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@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@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@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Labelling certain contours
Thanks Carlos, that worked fine On 18 August 2016 at 14:11, Carlos Cerdán 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 : >> >> 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@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@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@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Labelling certain contours
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 : > 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@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@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user