Questions tagged [categorized-renderer]
The categorized-renderer tag has no usage guidance.
46
questions
4
votes
1
answer
106
views
Show a fixed number of decimals in expression for vector categorized styling
So I am creating a categorized styling using an expression involving float numbers.
The results looks like this
The first row is displayed as "0 - 0.2m"
Is there a way to set in the ...
2
votes
1
answer
79
views
How to ensure a newly created layer displays on the canvas
I am trying to perform some categorization from an existing vector layer such that after performing the calculations, a new vector layer is created with just the new fields created. After running my ...
1
vote
0
answers
24
views
Categorize the symbology using column "Type" by SVG symbols with a nested category using column "Hazard Risk" (Color) in QGIS
I have point data and I already categorized it using specific SVG symbols. Now, what I want to do is to categorize further the SVG symbols by color (Low, Moderate, High, Very High).
Is there a faster ...
1
vote
0
answers
69
views
Setting symbol level to the symbols with pyQGIS
I am able to apply a style to a vector called "merged_zone".
Here my script:
# Symbol
sym1 = QgsFillSymbol.createSimple({'color': '#bed2ff', 'outline_color': 'black'})
sym2 = QgsFillSymbol....
3
votes
2
answers
109
views
QGIS expression not working in categorized symbology
In layer properties, when I want to work with categorized symbology, I categorize > value > concatenate(code 1, code 2) and after that, I click on "classify". And QGIS doesn't work (...
4
votes
1
answer
177
views
Check and uncheck the child tree layers created by using a graduated renderer
My PyQGIS script creates a number of layers, including one with a Graduated symbol renderer "DE Single", which splits my line symbols into 8 ranges e.g. -150 to -105.
I have PyQGIS code to ...
0
votes
1
answer
81
views
Modify layer's renderer with pyQGIS (QgsGraduatedSymbolRenderer)
I want to modify the color ramp of my layer in pyQGIS like I would do it in the layer properties :
I identified QgsGraduatedSymbolRenderer().updateColorRamp(ramp=color_ramp) as the function to update ...
2
votes
1
answer
81
views
How to export images through Layout Manager by switching the display of categorized render one by one
I recently started using QGIS to create distribution maps of organisms. OS is Windows 10, and QGIS version is 3.24.1.
What I want to do is how to export a large number of images by switching the ...
1
vote
1
answer
265
views
Batch saving multiple rendered images in QGIS
Using 3.16.3-Hannover
I have multiple images with a an applied singleband pseudocolor symbology. I'm looking for a way to batch export them. I came across the following code, but it exports the raw ...
2
votes
1
answer
197
views
How to reorder categorical raster legend order in R
For example, I have a landcover raster and I want to use terra::plot to make a map.
library(terra)
test <- rast('test.tif')
plot(test)
The order now is "3,4,6,8". Now I want to reorder ...
0
votes
0
answers
79
views
Invalid classificationField when updating symbology via ArcPy
I'm new to defining symbologies via ArcPy. I have some code (snippet below) that identifies broken links in .aprx files, sets a new data source & refreshes the symbology data range of this new ...
2
votes
1
answer
3k
views
How to "Save symbol to style" for layer with Unique Values style in ArcGIS Pro 2.8?
I'm new to ArcGIS Pro and this process is really easy and straightforward in QGIS but ArcGIS Pro seems to be complicated everywhere.
I just want to save the symbology of this counties layer which ...
10
votes
1
answer
2k
views
Points Clustering - QGIS 3.18
I already asked a similar question here and I tried the different solutions but I wasn’t very successful.
Thus, I was thinking of using another approach if possible and I created another question.
...
1
vote
1
answer
378
views
Assigning QgsCategorizedSymbolRenderer Spectral Ramp to MultiPolygon
I currently have a Python script that adds a MultiPolygon shapefile to my map within QGIS. Within QGIS, I can apply a categorized symbology render, with the color ramp 'Spectral' going from blue to ...
6
votes
1
answer
298
views
Configure symbol levels using PyQGIS
I have a QgsCategorizedSymbolRenderer and I'm trying to configure it so that symbol_a:
appears at the top of the layers window legend, but also
appears on top of all other QgsRendererCategory symbols ...
1
vote
1
answer
90
views
Deleting style categories in QGIS3 leads to incorrect feature count
If I use PyQGIS to delete style categories of a layer the feature count gets messed up:
Before deleting the category (style class) "3x20/15mm /VL" the featurecount shows 1 feature which is ...
2
votes
1
answer
503
views
PyQGIS: How to apply a color ramp on the symbol's outline when using QgsCategorizedSymbolRenderer?
I have polygon layer containing overlapping features (service areas for several years) and I want their symbology to
use a color ramp in QgsCategorizedSymbolRenderer applied for each year
use a ...
2
votes
1
answer
482
views
Style by categories for items with no value in QGIS
I need to style a shapefile by graduated, but some items has no value for that items. (eg. the limit for each categories are 0/99 - 100/199 - and so on, but some items has no value, that means that ...
1
vote
0
answers
24
views
Making Open Action only enabled on visible polygons
I have a shape with polygons with Date field (YYYY-MM-DD). The shape is displayed as Categorised according to year (substr("Date",1,4) and I can switch polygons on an of according to year.
I have an ...
1
vote
1
answer
111
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. ...
4
votes
2
answers
369
views
sym.renderer.breakCount value not changing in ArcPy with ArcGIS Pro
Experiencing trouble with ArcGIS Pro 2.3.2 sym.renderer to assign symbology to a layer in a map project using only Python. I am automating map creation, and layer creation, symbolization. I am trying ...
7
votes
2
answers
2k
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
2
answers
1k
views
How to sort legend values by an index item in QGIS?
Using categorized classification method for creating a legend on QGIS permits to create an automatic legend based on the values or categories defined in on item or a combination of items, or a ...
4
votes
1
answer
1k
views
Applying categorized render to polygons
I'm trying to apply a color ramp on a categorized render in QGIS 3.4 (via the Python console).
I started by adapting the solution for a catagorized symbol layer - to QGIS 3.4 but this applies a ...
1
vote
2
answers
892
views
Applying SVG marker as additional symbol to polygon layer in QGIS 3
I would like to add SVG markers as an additional symbol to a polygon layer.
The polygon layer is rendered with a categorized symbol renderer with different fill-color, and I want to add SVG markers ...
0
votes
2
answers
116
views
Don't show empty categories in classified style
I have a geojson file containing line and polygon features.
I want to render them according to the field Feature Type which contains different types. When I use categorized symbology, it creates ...
2
votes
1
answer
1k
views
Categorized symbols are not working in QGIS 3.4
I'm trying to generate categorized symbols for a polygon layer in QGIS 3.4. The code below should generate random colour polygons for each record of 'run' layer and I'm not getting any error message. ...
2
votes
1
answer
608
views
Why do symbol categories disappear when unchecked in QGIS?
I am using Qgis 2.18.25
In a vector layer, when using the categorized style, when I uncheck a category the category disappears.
Is there any way to avoid this behavior?
Actually I do not really ...
2
votes
1
answer
247
views
Getting "value", "color", "label" from existing palette raster layer in PyQGIS?
renderer = activaterlayer.renderer()
symboloyitems = renderer.legendSymbologyItems()
label = symboloyitems[i][0]
color = symboloyitems[i][1].getRgb()
value = ?
How can I get the ...
2
votes
1
answer
657
views
PyQGIS - categorized renderer classification - create category with 'no value' or 'any other value'
The code snipped mentioned in Automatic pyqgis categorized renderer classification and Apply symbol to each feature (Categorized symbol) automatically create categorized renderers and determine ...
0
votes
1
answer
659
views
QGIS categorized legend show only with data [duplicate]
I generate maps from CSV to which I apply a style sheet.
In the stylesheet defines the set of items I may encounter.
But in most csv, there are not all the elements defined in style.
So I find ...
1
vote
0
answers
82
views
QgsPointDisplacementRenderer: setLegendSymbolItem creates dump [closed]
trying to set up a nice layout using the QgsPointDisplacementRenderer,
but I get a dump everytime I try to load the layer I create through the following renderer.. The dump only occurs when I use the ...
4
votes
1
answer
1k
views
QGIS feature count is wrong after changing categories programmatically
I want to delete categories in my vector-layer style if the feature-count for the category is zero.
The following code works so far if you run it in the python console but the feature count for the ...
2
votes
1
answer
2k
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
1
answer
335
views
Relying on order of layer categories in PyQGIS
Follow-up to this question, after input considering this other question:
To figure out which feature in a QGis vector layer, styled with a categorized renderer, is currently visible (i.e. enabled), I ...
7
votes
1
answer
1k
views
How to change visibility of a particular layer category in PyQGIS?
I've got one layer with its symbol MARKER, categorized by an expression in 4 colors. The colors depends on a value of a column. So from the TOC, I'm able to click and enable/disable, as they were ...
2
votes
1
answer
2k
views
QGIS coloring NULL values
I am using QGIS Version 2.14.3.
I have a map with polygons and a lot of different attributes. Some polygons have NULL values in some columns.
I've tried to color the polygons with properties->style->...
7
votes
1
answer
10k
views
How to make a multi color map with one shapefile layer in QGIS?
I am working with a shapefile layer of the world. All the countries are in the Attribute table each one in a different row.
I tried to make each polygon in a different color so the countries will be ...
2
votes
1
answer
857
views
How to change colors for layers?
How to save changing of colors?
For example, we change color for all features of a layer in a loop. But as a result, I see only latest changing.
My code does not work perfectly:
for k in masLevel: ...
8
votes
1
answer
1k
views
Calculating colors of the squares in a vector grid in QGIS 2.18.5
I have a layer with many buildings as points on a map. One of the attributes of each building is "download_speed".
I want to put a square grid (100 x 100 meters) on top of the map. The squares should ...
7
votes
2
answers
2k
views
If two symbols in same QGIS layer are too close, show only one?
I have a shapefile layer with different underwater, over water and water surface stones. These are often too close to each other to be shown nicely on the print composer generated map. I use svg ...
3
votes
1
answer
1k
views
Scripting the mapping of style columns attributes in QGIS?
In a vector layer is it possible to tune up/scripting the style columns attributes to map "Label" column to a specific attribute field/column instead of being populated with same content as the "Value"...
1
vote
1
answer
231
views
Creating grouping for C# ArcObjects UniqueValueRenderer?
Within a C# procedure I am able to successfully render discrete data values using:
pValRen.AddValue("A11", fieldName, (ISymbol)pExpressWay);
pValRen.AddValue("A15", fieldName, (ISymbol)pExpressWay);
...
2
votes
0
answers
535
views
qgis2web categorized renderer symbology with svg markers issue [closed]
In a simple QGIS (2.14.5LTR) project I've set up categorized renderer symbology for a small shapefile which looks like this:
Categorization is based on a text field, cp. my comment on qgis2web export ...
1
vote
0
answers
687
views
qgis2web export categorized renderer symbology
I'm trying to export my QGIS (2.14.5) categorized renderer symbology to a leaflet project with qgis2web (1.19.0).
My example QGIS project looks like this:
The resulting (preview, respectivly) ...
2
votes
1
answer
986
views
Assigning QgsCategorizedSymbolRenderer default ramp colors?
I have a plugin and I want to symbology a vector file with some default ramp colors but I see that in graduated symbology is not so easy as in graduated symbology.
Is it possible to assign a default ...