Questions tagged [rule-based]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

QGIS : On layers using my custom function and also having a Rule (Filter) the Vertex Tool is not working

I am using QGIS 3.16. To show my problem in details, I have made a very simple test example : Create New Shapefile Layer File name : Test Geometry type : Line OK Scale : 1:1000 Draw a line id=...
3
votes
0answers
38 views

Arranging rulebased symbology alphabeticaly

QGIS version 3.16.4 I'm working with a layer that has a lot of different items in rulebased symbology. But they seem to be ordered randomly. Is it possible to arrange them alphabeticaly? I'm hoping ...
0
votes
0answers
26 views

Adding categories classification to rule

How do I add sub categories to a rule with automatic classification as I modify a field? Basically I want to give the chance to display each single new feature.
3
votes
1answer
85 views

How can I load and draw predefined chart images (diagrams) rule based and related to a point vector layer with QGIS

I have a bunch of diagrams for a set of route segments, stored as PNG, PDF or SVG with a regular name (topic-segment-id.(png|pdf|svg) for example), representing a certain aspect (like crossing rate or ...
1
vote
2answers
67 views

Rule-based symbology based on related layer in QGIS

I'm working with QGIS I have two layers: Layer 1: has the id and geom columns (multypolygon layer) Layer 2: has the id, gid and type columns (table layer). The value gid of layer 2 is the foreign ...
2
votes
1answer
19 views

Marker line in rule-based layer?

In a line layer, which is rule-based rendered : As I can see it, it is only possible to ad simple lines. I want to ad a marker line. Is that not possible ?
2
votes
2answers
80 views

Symbology Based on Meeting Criteria

I have a dataset that includes populations and subpopulations, so for each main population there may be several subpopulations. I have organised this in the table so that a population has the same ...
2
votes
3answers
829 views

Multiple overriding rules for styling in QGIS 3.4.0

I am a total beginner to QGIS and still struggling with the basics. After a quick research on this forum I could not find the answer to my current issue. What I am trying to do is to colour the ...
1
vote
1answer
340 views

Line at map scale that do not vanish when zoomed out? (QGIS 3.8)

I'm drawing rivers and roads as linestrings with width set in map units from an attribute. When zooming out, of course they vanish quickly, because 10, 20 or 100m is less than a pixel at 1:100,000 ...
3
votes
1answer
71 views

Applying Rule-Based Style taken from another layer to layer with no geometry

I have two layers "Suburb_Type", that has more than 1000 suburbs in shapes and is styled with categorisation rule. (columns: 'suburb_code', 'geometry', 'category_variable') "Suburbs_in_Study", with ...
5
votes
1answer
217 views

Dynamic legendlabel for a rule-based style

I have a rule-based style that is linked to a print-composer. In that composer I activated the atlas-function with a filter. Because of that filter the outcome of the rule-based style varies. Is ...
5
votes
1answer
152 views

Nested rules in QGIS 2.18

I work with QGIS 2.18. I have a polygon shapefile with two atrributes: id (unique for each polygon) and type. I visualize the shapefile using the "type" attribute, but I would like to add a nested ...
3
votes
0answers
21 views

How to prevent not visible objects (scale rules) from being identified?

In Symbology tab I am using rule-based symbols and I have defined visibility rules dependent on the minimum scale. Above some scale threshold some features are not visible as I expected. But when I am ...
3
votes
1answer
59 views

Stretch label all along line length

I need to know if in QGIS 3.16 there is a method to stretch a label all along line length. My layer has lines with different length and I want to know if is possible to stretch automatically labels ...
5
votes
1answer
72 views

Removing an empty entry rule by using QgsRuleBasedRenderer without affect other rules filled in PyQGIS?

I create rules with this code but it creates one more but without data and when using root_rule.removeChildAt (0) it deletes a correct one. layer = iface.activeLayer() symbol = QgsSymbol.defaultSymbol(...
0
votes
0answers
25 views

Move labels with rules generate overlap

If I move the layer's labels with the move label tool my label is overlapping. The labels are categorized by rule My rule are based on two field "column1" and "column2" I can't ...
8
votes
1answer
629 views

Place label along line near start and end of line in QGIS

I have four fields managing the numbering of the start and end of road sections. I created two label rules, one for the start and one for the end of the road sections. I set the position of the ...
2
votes
1answer
1k views

Managing rule-based renderer in PyQGIS?

This is my first project in QGIS and I'm also quite new to Python. PyQGIS is more than a challenge for me! I found code in How to programmatically set a rule-based renderer in QGIS? to set a rule ...
10
votes
2answers
229 views

Rule-based symbology based on current selection in QGIS

I have two oracle layer (point(p1) and polygon(pl1)). I want to build a rule-based symbology which is based on current selection on two cases: Case 1- When I select a point from table p1, I want that ...
1
vote
0answers
20 views

Action on filtered objects QGIS

I have got a point layer with about 1000 points. These point has a rule based symbology. So far so common. In this layer I have also some actions implemented. If I unselect some rules, that only the ...
2
votes
1answer
106 views

Features color based on layer's color in QGIS

Is there a way to synchronize the selection color with a layer's color in QGIS?. Following this post https://gis.stackexchange.com/questions/111784/displaying-only-selected-features-on-map-in-qgis#= ...
2
votes
1answer
48 views

Rule Based styling with different forms and colors

I have a map about different locations of amphibians. I want that the colors illustrates the specific species and the form illustrates the stadium (young, adult). I know how to give different colors ...
1
vote
2answers
93 views

Rule for labeling ways not being part of OSM relation in QGIS

A brief overview of what I want to achieve: Create a map showing all cross-country ski trails in a specific region with some customizations/styling on them. The data come from OpenStreetMap ...
1
vote
1answer
34 views

QGIS Symbology: how to make a symbol a shape according to a set of rules and a color according to another set of rules

I'm using QGIS 3.14 with GRASS 7.8.3. I have a data set with point coordinates on a plan (artifacts on an archaeological site). I have two main variables that I want to show. So, I'd like to have the ...
3
votes
1answer
68 views

Labeling only maximum value when zoomed out or print in smaller scale

I would like to prioritise the maximum values to be shown on the map. In other words, when the label collides it should drop out the minimum values. In the shown examples, I would like to have ...
2
votes
2answers
226 views

How to export layers with rule based symbology with qgis2web

I am working as volunteer on a simple map for an NGO, I have some point layers with rule-based symbology. When I load these layers in qgis2web the symbology disappears, both in Leaflet and OpenLayers. ...
5
votes
2answers
280 views

Save Rule Based Symbology as Default Layer Style

I am constantly moving layers in and out of my projects, I was able to set default style for layers and they all the layers I drag and drop to my project get the same style by default. Lately I have ...
4
votes
1answer
2k views

Rule-based symbology in QGIS

I'm trying to create the following rule based expression for displaying a line : If column "riparian Veg"has a 'Yes' entered into it then display the line but if another column titled "Primary" has '...
1
vote
2answers
144 views

Qgis 3 - Rule-base labeling combining to backgrounds

I have a pointlayer with no symbology, but is labeled by numbers 1-74. The labels is styled with a circle background. For some of the points I need to keep the circle, but add a small SVG-symbol to ...
1
vote
1answer
39 views

Change/Hide the pen width for line shape file based on rule in QGIS

I have line shapefile, in which I have a condition to display line's width based on a rule as shown in the image below. But in this case I was not able to define line width to 0, it is taking hairline ...
0
votes
1answer
120 views

How to run multi level segmentation for LULC in process tree, eCognition software

Can we run the eCognition multi level (level 1 ,level 2,...) segmentation and classification in the same process tree? I want different outputs to show for each levels in a process tree. I'm in the ...
1
vote
0answers
65 views

Using 1:n table relationships in rule-based symbology

I would like to use the value of a field/attribute in a parent table as a filter in an expression used to display features in the child table. Specifically, I have a 1:n relationship in my project: ...
0
votes
1answer
50 views

Labeling by using different columns

I try to label a layer by using a rule based labeling. What I specifically try to do is to find an expression which says: "If column 1 shows the attribut x then label layer "Test" by the attribute of ...
1
vote
1answer
32 views

QGIS different scale levels in rule-based styling - in one rule

I have a layer with 4 roadclasses. For this layer I created a rule based symbolization, with 4 rules. In every rule I filter another roadclass and set a different symbolization and scale for this rule....
1
vote
1answer
58 views

QGIS rule based styling - rule ordering

I’m experimenting with some rule based styling which is working really well to a point but I’m hoping it can do more. I work in school transport I’ve plotted all pupils in a certain school on the map. ...
1
vote
0answers
25 views

QGIS 3.4 - Symbology expression for features that have not been styled by rules [duplicate]

I have a rule based set of expressions for styling a map according to the contents of the 'Layer' field. e.g if the Layer starts with a 'C' "Layer" ILIKE 'C%' colours the line red. Is it possible ...
3
votes
1answer
228 views

Using Rule-based/Geometry generator style in QGIS

I have layer for comments in qgis, symbology style is rule based with Geometry generator. Problem is with displaying name in layers tab because the line before text is too long How do I solve the ...
1
vote
0answers
40 views

Labeling rule depending on whether label fits in polygon

I'm labeling some country polygons with their names. The data have one attribute with the full country name and another one with a short version (e.g. Sweden/SE). I want to label the countries with ...
2
votes
0answers
99 views

Projecting GeoTIFF onto shaped roofs using CGA rules

I am working with CityEngine 2019.1 and would like to project a GeoTIFF as a texutre onto shaped roofs of 3D-buildings. Currently I am trying with the following code which essentials are described on ...
0
votes
0answers
102 views

How to set fixed distance labels from data defined centroid in QGIS (3.4)

I have a labelling issue in QGIS (using 3.4, but haven't tried in other versions). I have polygons for which I show an id number as well as some data information in the labels. I've used rule-based ...
3
votes
1answer
77 views

Using the field calculator in rule based symbology

I am trying to categorise my site points by species group with rule based symbology; e.g. bat uses the formula "Group"='Bat' But I would also like to have a different symbol for where there are ...
6
votes
2answers
600 views

QGIS styling a legend

I am a newbie working on QGIS 3.6 / Windows 10 I need to style a legend for map with headings and sub headings The main divisions of the legend item need to be subdivided into sub-classes i.e. The ...
6
votes
1answer
162 views

Rule-based labeling with optional second field

I need to label some polygons with 2 fields using only one label: The first being a field in the attribute table named "Bio-Code" the second one being optional if a cell in the field "BBT-Code" is ...
3
votes
1answer
256 views

Can qgis2web display rule-based layer style?

I’ve just made a map that has two layers: one that contains the polygons and other that contains points. For the last one, I used rule-based symbology where I define the size and colour of the points ...
8
votes
1answer
183 views

QGIS can't detect negative values?

I'm working with the last version of QGIS (3.8.3-Zanzibar), and I'm trying to represent a Rule-Based Symbology from a CSV file with the following rules: And the data from the prcptot column is this: ...
3
votes
6answers
1k views

Rule based coloured background for labeling in QGIS

I am a newbie working on QGIS 3.6 / Windows 10. I need to label a polygon layer which is categorised by colour. (pls refer to attached pic as a graphical reference) The labels need to have a ...
0
votes
0answers
80 views

QGIS Rule-Based styles fail to render

I'm working with some Ordnance Survey data, specifically the VectorMap Local (in GML format, October 2018) set and attempting to style the layers using the very handy OS provided stylesheets (here: OS ...
1
vote
1answer
45 views

Drilling Rigs Rule-Based Styling

I am trying to do rule-based styling for active drilling rigs in the United States. Basically, I want to have categorized styling (different colored dots) for all companies (field = "OpCompany") ...
1
vote
1answer
121 views

Rule based styling in Qgis using a combination of attribute(get_feature()) and ILIKE

I Have 2 Layers: I want to Filter Layer 2 by an attribute from Layer1 for some rule based styles. I'm currently using following expression to realize that: "C1" = attribute(get_feature(‘Layer 1', '...
3
votes
0answers
70 views

Moving individual labels & rule-based labelling in QGIS

I have been playing around with labels and came to a problem. Hopefully someone can pinpoint whether I'm doing something wrong or there is a systemic hurdle in Qgis. Are you allowed to move labels ...