Questions tagged [rule-based]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
16 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
22 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 ...
2
votes
1answer
56 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
33 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
71 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
36 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 ...
2
votes
1answer
41 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 ...
0
votes
0answers
17 views

Extruding asset along Base Polygon in CityEngine having difficulties using function insertAlongUV

I have been experimenting with CityEngine to automate modeling of repetitive structures that follows a similar design. In this case, I'm trying to model a bridge that curves along with its length. ...
3
votes
1answer
51 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 ...
3
votes
1answer
68 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 ...
5
votes
1answer
95 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 ...
1
vote
1answer
79 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. ...
8
votes
1answer
133 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
1answer
131 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 ...
6
votes
2answers
130 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 ...
2
votes
6answers
257 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
54 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 ...
2
votes
1answer
57 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#= ...
0
votes
0answers
17 views

Displacing points by rules without losing colours using QGIS?

In QGIS, I managing a layer by rules but some points are so close, and I used the function displacement points (By rules) but all the symbols that I used turned black on the map, they lost the colours ...
1
vote
1answer
35 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") ...
2
votes
0answers
30 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
90 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
78 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
74 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
71 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 ...
1
vote
1answer
147 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
48 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 ...
5
votes
1answer
104 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
56 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
35 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
40 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
49 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
42 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
77 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
69 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
42 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
88 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
90 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
160 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 ...
2
votes
1answer
197 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
152 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
370 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
46 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
334 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
34 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
1answer
67 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
80 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
93 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
164 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 ...
3
votes
1answer
414 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 =...