Questions tagged [rule-based]
The rule-based tag has no usage guidance.
138
questions
1
vote
0
answers
12
views
Style rule based on qgsfunction not working in QGIS 3.22 #92
I'm using a QGIS style based on a function which returns the value of a layer variable passed through a pyqgis plugin :
@qgsfunction(args="auto", group="toto")
def color_trajecto(...
3
votes
1
answer
74
views
Creating rule-based style for attribute between two values in QGIS
It seems a pretty straightforward rule but I believe I am missing something simple. Let's say I have, in my attributes table, an attribute called "NumberOfFloors", with values between 1 and ...
1
vote
0
answers
49
views
QGIS rule-based filtering not working
I'm having a problem with rule-based filtering in QGIS. I created a rule and tested it, and it showed that it gets hits. Below shows the attributes to which I wish to apply the rules:
The following ...
3
votes
1
answer
86
views
Highlight polygons using comma delimited text coordinates QGIS
I am new to GIS. I have significant CAD experience and some limited Python knowledge, and am generally familiar with basic QGIS functions.
In short, I will have several CSV files containing co-...
7
votes
3
answers
201
views
QGIS labels with multiple rule based icon
I'm learning QGIS. I have drilling locations showing on a map with a specific SVG icon (D1 and D2). I also have my labels showing the name of the soil sample taken in each drilling and the ...
2
votes
1
answer
46
views
"Rule-based" background color in QGIS attribute form containers?
In QGIS attribute form Drag and Drop Designer we can choose a backgroud color for widget containers (Tabs and Group boxes):
Is it possible to have rule based background colors depending on some ...
1
vote
2
answers
35
views
Rule-Based layers not displaying in the correct order
I am having trouble with bottom layers overlapping upper ones within a rule-based layer. (screen showing the issue) It used to work just fine, I was able to create new polygons under ones previously ...
1
vote
1
answer
59
views
Group style groups within on layer in QGIS
I created a complex style for a layer using rule based styling. In the original project, the layer is presented in the layers panel the same way it is displayed in the layer properties, that means ...
3
votes
2
answers
117
views
Referring to rule style in expression string builder in QGIS
I'm working with QGIS 3.16 Hannover.
I've got a rule-styled polygon layer cuadric_cabañ. Rules are:
overlay_intersects(layer:='habitat_caba',filter:=(CODIIGE=210 OR CODIIGE=320))
overlay_intersects(...
0
votes
0
answers
25
views
Buffer around lines with rules or expressions
I need to create buffers around a layer of lines that represent infrastructures and they are symbolized according to the type (roads, railway, waterway and electric cables). Is there any way to create ...
2
votes
1
answer
72
views
"Eval Error" when selectively rendering raster layers in QGIS Atlas
Using the Atlas feature in the QGIS print composer, it is possible to use rule-based symbology to show/hide components of vector layers as required or defined by the Atlas?
I have multiple pages, ...
5
votes
1
answer
86
views
Propagating symbology changes made with PyQGIS to Layer Styling Panel
I am using a script to change the opacity on a rule-based symbology.
layer = iface.activeLayer()
opacity = 0.2
if layer.renderer().type() == 'RuleRenderer':
renderer = layer.renderer() #...
3
votes
2
answers
103
views
QGIS rule-based labelling base on active map layers
I'm new to QGIS.
I'm currently using the new version 3.20.0 Odense and I have some troubles setting up the rule-based labelling for a layer.
Essentially, what I need is to automatically swap labels ...
1
vote
0
answers
64
views
Rule based symbology in QGIS [closed]
I want to make a rule-based symbology with two classes: one class with all the empty cells in a given column and one class for the cells that do have a value in it.
In Excel I would use something like ...
3
votes
0
answers
76
views
Auto updating rule based symbology categorised by date
I have a shapefile of "Detection Points". These have a "strength" attribute and a "date" on which each was made. Data collection is ongoing - that is it began in April ...
4
votes
1
answer
76
views
Filtering on centroid distance between layers in Rule based layer styling in QGIS
By using Rule based layer styling for a polygon shapefile I want to display only those features whose centroid is separated by 1.000m from the feature centroids of another polygon layer ('layerB'). ...
2
votes
1
answer
120
views
Rule-based symbol for point within polygon in QGIS
I would like to use a set of rules to draw features from a point_layer that are within a polygon_layer.
Points that answer true to
("VAL_PROTECTION_EP3" = '1' AND "TYPE" = 1)
...
1
vote
1
answer
29
views
Setting expression for two different table attribute to store as default style
I'm new on QGIS. I would like to store a default style in geopackage use by two different table attribute. First table with "building_height" , and second table with "block_height"....
0
votes
0
answers
56
views
How to efficiently filter and select attributes based on conditional formatting?
I am wishing to filter my attribute table to display only certain values that meet certain criteria based on multiple column values.
For example, I want to show all locations on my map that are Lost ...
0
votes
2
answers
346
views
Rule-based styles don't work in QGIS (points don't appear)
I took a very good course on QGIS from Udemy (GIS in QGIS 3 for beginners) and made a pretty complex map with it. A month or so afterwards, I made a pretty simple map without any problems using a rule-...
-2
votes
1
answer
32
views
Using Rules to check NonBlank entries in QGIS [closed]
I am trying use Rules in Symbology to display entries based on a criteria. The criteria is display only those entries which have a date associated with them. I have table of points which has Date ...
1
vote
1
answer
71
views
PYQGIS rule-based renderer with SVG symbols
I am trying to create a rule-based renderer with different SVG icons for each class. For some reason, I keep getting the error :
Rule' object has no attribute 'QgsSvgMarkerSymbolLayer'
Why do I get ...
4
votes
2
answers
176
views
Setting different font color types from the same field in rule-based labeling in QGIS
Trying to set different font color types from the same field in rule-based labeling in QGIS.
I have a "C°" field with only 2 values: +56.7 C° and -89.2 C°.
Trying this expression to have it:
...
2
votes
1
answer
85
views
Usage of QgsRuleBased3DRenderer with PyQGIS
I'm trying to use QgsRuleBased3DRenderer with PyQGIS in order to set different color in a 3D view.
I'm trying to make something similar to this but with the 3D syntax (here is the 3D syntax: https://...
0
votes
0
answers
129
views
QGIS - label color setting
I use rule-based labeling with geometry generator on line layer. I use expression @symbol_color, because I want to have color of labels the same as color of lines. However, @symbol_color doesn't work ...
0
votes
0
answers
27
views
Merged Shapefile with different Styles
QGIS Zurich 3.18.2 Need to pass on a Shapefile to A Nother. There were three Layers each with assigned Label Style (saved) as can be seen
Yes I know I have a lot more work to do on the Label placement/...
0
votes
0
answers
47
views
Cannot Load Rule Based Label with QGIS
Working with QGIS, I saved my Rule Based Label as a .qml file. Opened a new Project Loaded the Shapefile and then Loaded the Style .qml file but it lost its rule based styling, x and y displacements ...
3
votes
0
answers
48
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 ...
1
vote
2
answers
230
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
1
answer
26
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 ?
3
votes
0
answers
23
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 ...
4
votes
1
answer
156
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
1
answer
131
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(...
12
votes
2
answers
665
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 ...
3
votes
1
answer
94
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
0
answers
31
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
1
answer
77
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 ...
2
votes
1
answer
51
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 ...
2
votes
2
answers
102
views
Symbology Based on Meeting Criteria using QGIS
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 ...
8
votes
1
answer
2k
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 ...
5
votes
1
answer
4k
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 "...
3
votes
1
answer
119
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 ...
1
vote
2
answers
221
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
1
answer
60
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
1
answer
229
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
0
answers
87
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
1
answer
56
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
1
answer
54
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
1
answer
89
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
0
answers
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 ...