Hi Lucas,

Actually we don't just blindly copy "ArcGIS" - not like gvSIG copied the UI of ArcView 3. Actually most devs and users do not have access to ArcGIS - because it is quite expensive. The last ArcGIS version I personally used was 8.3 or so, several years ago. So please do not ask for features because "ArcGIS" has it and do not assume that most people on this list know how things work in ArcGIS. Although ArcGIS is very powerful, there are already quite a few things you can do in QGIS, but not in ArcGIS - but certainly - and even more so - the opposite way. Actually we don't care much about ArcGIS - we do our best to satisfy our users needs with the limited financial resources we have, probably 0.00xx percent of what ESRI has available in its budget.

However, I agree with you, that rule-based or categorized labels would be very useful to have in QGIS. In fact we know this for a long time already - since version 2.0 people have asked for it. But - it is quite a lot of work to implement. If you need this, consider sponsoring it or start a crowd-funding initiative.

As to your question "how do you know what QGIS 'expect' after the 'then'". Click on the data-defined drop-down symbol and select "Description". A small window opens that tells you the data type, description and example. In case of "bold" it expects a 0 (inactive) or 1 (active). See the two small screenshots attached.

Andreas

On 20.06.2015 09:32, Luca Galuppini wrote:
@ Fred: thank you for the workaround you have suggested, but i need something "clean" as my project is so much "crowdy" as it is now, duplicating layers or breaking them by attribute is something i would keep as last resource...

@ Tom: this is what i was looking for, i'm not familiar with this kind of expressions (is it SQL?) and surely next versions of qgis need some GUI for this function, even if probably the expression thing grants more flexibility. anyway, how do you know what the program "expects" after the "THEN"? what is the correct argument for bold, or italics, or a different font color?

2015-06-20 3:20 GMT+02:00 Tom Lennon <[email protected] <mailto:[email protected]>>:

    Hi Lucas:
    You can use the "data defined override" to set the text size based
    on your classes.
    Use the fancy "E" under Layer Properties > labels > size.
    The program expects a number which will become the size.

    If the class in your data base is called "class" and it happens to
    be a number usable as the text size just put "class" in the override.

    If "class" is a ranking number ( like 1 - 6, with 1 being the
    largest population and 6 the least) then enter 13 - "class" in the
    override to get 7 for least and 12 for largest "class".

    if "class" is a population number then enter a CASE expression
    like this:
    CASE
    WHEN  "class" > 1000000 THEN  12
    WHEN  "class" > 750000 AND  "class" < 1000000 THEN  11
    WHEN  "class" > 500000 AND  "class" < 750000   THEN  10
    WHEN  "class" > 250000 AND  "class" < 500000   THEN  9
    WHEN  "class" > 100000 AND  "class" < 250000   THEN  8
    ELSE     7
    END

    The overrides can be used to also change font or type style based
    on data values as well.


    On Fri, Jun 19, 2015 at 5:52 PM, Fred Lali <[email protected]
    <mailto:[email protected]>> wrote:

        Lucas, just copy the same layer and paste in the same canvas n
        the label them with different fonts!



        For God and My Country
        Consultant in: GIS,Forestry and Environment @ Earth Consult(U)
        Ltd.
        CCRP GIS Support-Uganda
        (The MCKNIGHT Foundation)

        Rotarian at RC. Bweyogerere Namboole
        Mob: 0772/0752-841118
        Sent from Lumia Windows phone
        ------------------------------------------------------------------------
        From: Luca Galuppini <mailto:[email protected]>
        Sent: ‎20/‎06/‎2015 00:28
        To: [email protected] <mailto:[email protected]>
        Subject: [Qgis-user] labelling by attribute

        i'm sorry for posting a lot of newbie questions but tutorials
        are not so clear about this:
        i have to label a point feature with different font size or
        style depending on an attribute in the table (for example, i
        have cities grouped in classes by their importance, and i want
        the bigger cities to have bigger label size).
        this is really straight forward in arcgis but i really can't
        find this option in qgis 2.8.2, at least not in a place when
        one can find it easily.
        i expect i should have something similar to symbol by
        category, but nothing like that is in the label menu...

        _______________________________________________
        Qgis-user mailing list
        [email protected] <mailto:[email protected]>
        http://lists.osgeo.org/mailman/listinfo/qgis-user




-- [email protected] <mailto:[email protected]>




_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to