Questions tagged [rule-based]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
17 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 ...
4
votes
1answer
74 views

QGIS Draw by rule

I have a point layer with several colored dots. Each dot represent a find of a bumblebee species. E.g. red is B.terrestris yellow is B.hypnorum. In my attribute table I have a column named "nest" (...
2
votes
1answer
60 views

Catching signal when rule toggles (active/inactive) using PyQGIS?

I would like to catch a signal when a rule within a rule based layer toggles visibility. How to permanently check this layer.renderer().rootRule().children()[0].active()==True the same way we can ...
0
votes
0answers
27 views

How to use knowledge engineer in Erdas Imagine for rule based classification

I want to use rule based classification in knowledge engineer section of erdas imagine software. But I don't know how to create a *.ckb file. Can somebody point me to some reference material or ...
2
votes
1answer
28 views

Possible to set color based on attribute while using 2.5D symbology?

I'm using 2.5D symbology to have my features display at different heights based on a certain attribute, but would also like the features displayed as different colors based on another attribute. Is ...
0
votes
1answer
60 views

Rule-based labeling using Atlas - QGIS.3.6.2

I'm working with two shapes, both of them have a common field called "ID". I need the atlas to filter, only the id that I need to use, in the two layers. The point layer has an entry point and an ...
1
vote
2answers
39 views

How to make appear values above the mean on rule based labeling QGIS

I've been looking at the other questions relating to rule based labeling but I haven't found any answer to my query. I have polygons with average literacy rate for each canton of a country and ...
3
votes
1answer
69 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 ...
0
votes
1answer
51 views

Style a feature in one layer based on an attribute in another layer in Print Composer Atlas

I have two layers; one is the foreground and the other a background. Both layers have fields containing similar values (field values in the foreground layer (mun_code) is also present in the ...
1
vote
0answers
32 views

Detecting checking/unchecking of rules in a rule-based rendering using PyQgis [closed]

Is it possible to programmatically detect checking/unchecking changes of a rule in a rule-based rendering ? I found no indication of existing signals .. I got lost reading QgsVectorLayerRenderer ...
2
votes
0answers
37 views

Save QGIS style created with espression string builder

I created a rule-based renderer with espression string builder, where I also use the function editor in Python. When I share the style (qml) file with others, I realized that the Python function I ...
1
vote
1answer
38 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 ...
0
votes
0answers
41 views

Symbology or style to separate layers

I have a layer i.e. vegetation, i can split this layer in different colors using rules or categories i.e. light green = grass, darkgreen = trees. Then the colors appear 'nested the layer. When i make ...
1
vote
2answers
56 views

Altas with rules on different layer than the cover layer [duplicate]

I need to generate an atlas based on a polygon shapefile, but I'd like to see just what is inside the polygon itself. Maybe with rules that involves other shape's attributes. Any suggestion?
1
vote
1answer
45 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', '...
1
vote
0answers
28 views

How to add rules to the topology from a .rul in ArcPy

I am trying to create a new topology using and ArcPy script and I have a lot of rules inside a .rul archive. The function to do that is: arcpy.AddRuleToTopology_management(out_topo, rule_type, in_fc1,...
2
votes
1answer
61 views

QGIS raster rule-based coloring

I have a raster with different values (negative and positive). I want to color the raster based on a rule: All positive values have a certain color and all negative another. I don't want to use '...
1
vote
1answer
65 views

Rule-based rendering in qgis2web client is not working

I made a simple map with polygons of the staates of africa and used the rule-based renderer for different colors to tint them. When I tried to load or export this map with qqis2web I didn't get ...
1
vote
0answers
106 views

Rule-Based Styling not working in QGIS?

I'm trying to create a shapefile I can use as a template for a breeding bird survey. The basic gist was that each species has a two letter code and a colour depending on the BTO listing. Each bird is ...
0
votes
0answers
58 views

Multi line rule based labels in QGIS [duplicate]

I have created rule based categories for my symbology, and I would like to have multi line labels to go along with these. At the moment, I have written some expressions for specific cases, in which a ...
2
votes
1answer
130 views

QGIS 3 - Variables in rule-based rendering?

I'll try and lay this out clearly, I have most of it covered, but there's a very specific thing I'm looking for in the rules - whether or not it can be done and if so, how? Key things I have done and/...
2
votes
1answer
109 views

Rule based styling with select-by-intersection syntax

I want to do rule based styling for a selection of gridded polygons dependent on their position relating to another layer. I want to show the polygon that a point feature based in an atlas falls ...
2
votes
3answers
217 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
0answers
42 views

QGIS - Rule-based Symbology - Added Ranges do not carry over Legend entries [closed]

When I add ranges to a rule, under Rule-based Symbology, the auto-populated (or modified) legend values do not carry over. To fix this, I would have to manually change each line in the legend ...
2
votes
2answers
199 views

QGIS Atlas map composition to show only points inside Polygon?

I want to create an atlas map where I have some 40 polygons, 100 points and 200 lines as different shapefile. Now I want to automate the atlas map preparation for each polygon and needs to show the ...
1
vote
1answer
33 views

Add a scale or category to a rule which is only applied to points within original subset in QGIS

I have subset a shapefile of points to only include those having a value of (for example) 33 in the variable "Bout" using a rule based assignation: Now I would like to apply a sub-category to that ...
0
votes
0answers
13 views

Automatically add Points to Line Symbol

I've got a printed Map. The points marked with arrow in the picture only appear, when line feature crosses a coherently polygon feature. You can see an example in the picture. When the line feature is ...
0
votes
1answer
58 views

Rule-based styling window freeze in QGIS 2.18.16-22

While I was working on cartographic files (QGIS 2.18.16 - Linux Mint 18.1) using the rule-based styling window, suddenly the window and the program freeze and I can not longer work on editing. By ...
2
votes
2answers
57 views

Displaying 2 different color lines based on 2 different table attributes in QGIS?

I have a line shapefile that has a bunch of data and it is broken down into different features which is assigned a different number. It is then styled on the rule based approach so each feature gets a ...
4
votes
0answers
66 views

QGIS rule based symbology for rasters in Atlas?

I'm making species distribution maps and have got the Atlas working perfectly using a polygon layer to show the quarter degree grid cells for species observation records. I have ~ 250 species. Problem ...
3
votes
1answer
124 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 rulebased style varies. Is ...
2
votes
1answer
251 views

Adding new rule by using QgsRuleBasedRenderer to existing one in PyQGIS?

I want to add new rules for a layer. However when I add them previous one(s) are deleted. Here is my code: layer = iface.activeLayer() symbol = QgsSymbol.defaultSymbol(layer.geometryType()) renderer =...
2
votes
1answer
28 views

How to find objects which are styled twice (in rule based styling) in QGIS 2.18.10

I have the problem of a complex rule based styling (with 10 different styles and multi-line rules in each style) with several thousands objects. My problem is that the sum of all styled objects in one ...
2
votes
0answers
118 views

Set a rule for grow region in eCognition

I am using the grow region algorithm in eCognition sofrware in order to merge my candidate class. I want to set the rule : two candidated objects are merged only if the length/width ratio of the ...
9
votes
1answer
758 views

Visualizing layer using categorized AND graduated styles in QGIS?

I have a layer with road segments that come in five different classes and each have a value. I am trying to get a graduated color for the values (say, light blue for low and dark blue for high values) ...
3
votes
2answers
427 views

Displaying map labels over coordinate grid in QGIS?

My grid overlaps labels placed on a map. Is there a way of forcing the labels to be displayed in front/on top and the grid placed behind the text? Despite looking I cannot find a solution. Using ...
2
votes
1answer
191 views

Qgis 2.18.14 - rulebased and categorized style in atlas

I am currently generating an atlas. I have four parts of a map, showed on each page. For the map I have a lot of polygons styled in different colours after category. Now I need to make a rulebased ...
1
vote
0answers
196 views

Automatic refreshing of Styles and legends in QGIS?

I am a new QGIS user. I come from an Arcgis background, but in my current work for a public administration I must use QGIS for interoperability. As an ArcMap user, I am used to certain "comforts", ...
1
vote
1answer
363 views

Rule based labeling in rule based styles

I have got a layer with distance vectors between polygons. This layer has a rule based style where I can check each polygon to show only the vectors with contact to the polygon. Each vector has as an ...
1
vote
1answer
942 views

QGIS Rule-Based Styling Expression

I have a point layer with 2 columns, company name and short name. I have many company name entries but fewer short name entries with some of them being categorised under the same alias. See below for ...
4
votes
1answer
1k views

Changing symbol size using the “Size assistant” in QGIS?

I need to change symbol size of a categorised shapefile. For this I tried using the Size Assistant (in the style menu: right click > change size > Data defined override > Size assistant) However my ...
2
votes
3answers
319 views

Rules within thematic maps in MapInfo

Is there a way to set specific rules when creating a thematic map in MapInfo? I would like to exclude the polygons that have too many of the items I want to represent from the thematic map (something ...
3
votes
2answers
198 views

QGIS style polylines with alternate colours

I have a bunch of shapefiles with multiple polylines. Each consistst of 5 up to 30 polylines. I would like to define a style which colours them alternating two colours. When I use the Categorized ...
5
votes
2answers
3k views

Rule-based labeling in QGIS

I'm trying to label visited countries in a world map shapefile, what is wrong with my rule : if( "Visited" = 'yes', "NAME", NULL)
1
vote
1answer
451 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 ...
2
votes
1answer
201 views

Multiple rule based expressions with 2 layer styles in Atlas

I have 18 transects over a geographical extent and I am applying atlas to display a map for each transect. All is going well and I'm venturing into expressions and rule based rendering $ID = @...
1
vote
1answer
137 views

How to treat PosgreSQL array fields in QGIS rule-based styles filters

In a PostgreSQL/PostGIS DB I have a table with an attribute declared as a 1-dimensional integer array INTEGER[] holding a value like {1,2,3,4,5}. Now I would like to build a rule-based style and need ...
2
votes
1answer
127 views

Categorizing multiple values_multiple atributtes - QGIS 2.14

I have a problem with a polygon layer. Its an equipment and services layer... I want to aggregate different types of services in similar legend, like this: For example, these four : "Ensino ...
2
votes
1answer
223 views

Categorizing multiple entries in QGIS?

I am trying to categorize a polygon layer with several buildings, by the number of floors. I want to aggregate by classes like this way: 1 floor = 1 to 2 floors; 2 floors = 1 to 2 floors; 3 floors = ...
8
votes
1answer
206 views

cumulative atlas in QGIS 2.14 and above?

I have a question about something which I think is possible but just can't get my head round it, and haven't found any answers online. I'm using $id= @atlas_featureid in QGIS 2.14 to create an set of ...