9

Not sure if this is what you are aiming to: (1) Select Graduate and choose "values" for Columns. (2) Set your Color ramp to Blues, perhaps (3) Click on Symbol: --Change... button to activate Symbol selector (4) Click on the small Epsilon button (i.e. Data defined override) right to Width (5) Enter suitable expression something like: (5 - "classes") * ...


7

You could add the main rule $id = $atlasfeatureid, without adding symbols: Then select and drag all the other rules over it (over the label part). They should then become dependent of this first rule:


7

Right-click on the layer from the Layers Panel and then go to Layer Properties > Labels and choose the label you want to use from the Label with drop-down list (after having selected the Show labels for this layer option). Then, go to Expression Builder and try to use a CASE WHEN expression. Something like this: CASE WHEN $area > 1600 THEN "...


7

Your formula goes to "label with" ... not in the "filter" field ...


6

Below some help to setup rule based labeling from scratch with the new QGIS 3 API #Configure label settings settings = QgsPalLayerSettings() settings.fieldName = 'myFieldName' textFormat = QgsTextFormat() textFormat.setSize(10) settings.setFormat(textFormat) #create and append a new rule root = QgsRuleBasedLabeling.Rule(QgsPalLayerSettings()) rule = ...


5

There are several ways to achieve this purpose. You can always create rules for labelling, as you suggested, but you could try adding a new column to your file with the label for each desired class. This way is beneficial compared to creating rules, because the rules will be associated with your project file, and should you move your data elsewhere, you'd ...


5

As alternate solution, instead of using rule-based labelling, you can put your formula in the normal labelling field like below.


5

Okay, your approach points in the right direction, but has the wrong syntax. Please note that you can test rules and that the help in the field calculator/expression builder is worth consulting. First error: = > instead of >= - QGIS doesn't know how to deal with two operators right after the other. Second error: "5" - things in " always refer to ...


5

You can use rule based symbology or data defined override. Since your case is not too complex, I suggest rule based symbology because you will have a nice legend then. Set it up the following: In case you want to use data defined override you can do it like this for example: Use as expression: Case When "Nest" is true then 'triangle' When "Nest" is ...


4

Since QGIS 2.16 there is now an inbuilt way to calculate the maximum value for a whole layer: maximum("fieldname") This will return the largest value in the 'fieldname' column for the layer.


4

There's a (totally 100% unsupported) plugin at https://github.com/nyalldawson/topocolour which will add an attribute to your data which handles this. You'll need to manually download that plugin and copy to your .qgis2/python/plugins folder. It's not available in the plugin repositories.


4

QGIS uses one apostrophe for python string expression. Concatenating two text fields should be done like this: "FieldA" + ' ' + "FieldB" There is a space between the two single apostrophes. You can also use sa,e principal for integer or decimal values, so long as you use to_string() before the field name. Furthermore, you do not need to calculate a new ...


4

You just needed to use "=" instead of "is", surround your field name with "", and replace the () with '' around the offset values, see expression below: CASE WHEN "name" = 'Brooklyn Bridge' THEN '3.5, 0' ELSE '-3.5, 0' END


4

You should use a Rule-based renderer. Following your data, something like that: Click on the + button for adding a rule and then insert the custom expression (as indicated in the red box above). Remember also to click on the Apply button for applying the style.


4

In your case you would to represent size of the proportionality with a manual scale... It's not possible by this way as it show here What you have to do is to define your mathematic function with scale_exp as the size assistant method: Ex. coalesce(scale_exp(Number, 1, 11000, 1, 10, 0.3),0) Coalesce replace the first value not null by 0. First param: ...


4

Yes, either way (making expression with conditions or rule-based symbology) will work fine. As to the expression in the attached image, you could modify it to: CASE WHEN "feature" = 11 AND "label" = 'Existing' THEN color_rgb(255,0,0) WHEN "feature" = 11 AND "label" = 'Proposed' THEN color_rgb(0,255,0) WHEN "feature" = 11 AND "label" = NULL THEN ...


3

You could also use the following in the Python Console to change all expressions of each rule to $id = $atlasfeatureid: layer = qgis.utils.iface.activeLayer() renderer = layer.rendererV2() for rule in renderer.rootRule().children(): rule.setFilterExpression('$id = $atlasfeatureid') Edit: The above code replaces all expressions entirely. However, if ...


3

From QGIS 3, there is a new QgsRuleBasedLabeling Class which would allow you to control rule-based labelling using the new API. Rules can be added using QgsRuleBasedLabeling::Rule. (Unfortunately, I cannot test the 2.99 version at the moment. But I would happily accept an answer if it provides a working example.)


3

Now I understand your point. Adding subcategory to rule-based style is not working in QGIS 2.16.2, but actually it works using QGIS 2.14.6 long term release (LTR). Here is the output using Rule-Based Style without refine by subcategory: Here is the refine after adding subcategry: Only the subcategory economy under the category "Country" are styled. Since ...


3

You can set the Font Size to be a factor of the length of the geometry to be labeled and a number, so you would set your SIZE to an expression that uses length($geometry) * number note my data is in decimal degrees, which doesn't lend itself to a good example, but it does show that it works! Then the labels display as:


3

Well, if i understood your question the answers is this: You have to use "GEOMETRY (AREA) || GEOMETRY (PERIMETER)". Step_1 - Layer > Properties > Style > Categorized > E = Insert Expression ( AREA || PERIMETER)> ok... (In this step you can add more Geometry if you have in your table) Step_2 - classify > apply > Ok... Step_3 - Legend (On Layers Panel).


3

This should work Name LIKE 'NRG%'


3

The max function doesn't operate across features, just values passed to the function. Eg max(1,5,3) Will return 5. There's no function currently available which calculates the maximum value for an attribute across the entire layer.


3

What you seek, can be easily done using the atlas features in the print composer. No need for clippings or filters. Specially if done one by one... Create a map layout according to your needs; Add, at least, one map item; In the atlas generation, use the country shape as your coverage layer. At the map item select the controlled by atlas, and set a value ...


3

What version of QGIS are you using? I'm using 2.8 and I can style a layer by 'name' and also label it, and then turn off one of the features in the layer with a checkbox in the legend, and it isn't labelled any more.


3

You could try adding a new field in the table, with the area calculation and use that field instead of '$area' to give the labeling rule. Does it works?


3

The only thing I have come up with so far is to make a rule-based style with 1 selecting odd and other selecting even id's:


3

I prefer using the following expressions, which contain the modulus operator, for rule-based styling to determine if a value is even or odd: Even: "id" % 2 = 0 Odd "id" % 2 != 0 If you want to create a categorised style, you could use a little bit of Python by using the following in the Python Console: from PyQt4.QtGui import QColor layer = iface....


3

I figured it out by myself. Didn't know about the sum feature in the style tab and the column duplicate. By clicking on that button the number of duplicates are shown and I can find them much easier!


3

And to do it with rule-based labeling, remember that you can nest rules inside of other rules. So you'd have a rule where FEATURE = 11, and inside of that you'd have 2 or 3 sub-rules for the LABEL values (including an "else" option with no value defined for LABEL).


Only top voted, non community-wiki answers of a minimum length are eligible