Questions tagged [categorized-renderer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
49 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 ...
user avatar
0 votes
0 answers
17 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 ...
user avatar
1 vote
1 answer
957 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 ...
user avatar
  • 1,159
10 votes
1 answer
1k 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. ...
user avatar
  • 427
1 vote
1 answer
165 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 ...
user avatar
  • 173
5 votes
1 answer
185 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 ...
user avatar
  • 419
1 vote
1 answer
76 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 ...
user avatar
2 votes
1 answer
321 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 ...
user avatar
  • 924
2 votes
1 answer
296 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 ...
user avatar
  • 1,299
1 vote
0 answers
23 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 ...
user avatar
  • 11
1 vote
1 answer
91 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. ...
user avatar
4 votes
2 answers
233 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 ...
user avatar
  • 41
6 votes
2 answers
1k 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 ...
user avatar
2 votes
2 answers
803 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 ...
user avatar
1 vote
0 answers
143 views

How to add or delete one category in Categorized Symbol Renderer PyQGIS QGis 3.x

I need code for add o delete Categorized Symbol in QGIS 3 category = ? More information: https://qgis.org/pyqgis/3.4/core/QgsCategorizedSymbolRenderer.html
user avatar
  • 389
4 votes
1 answer
856 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 ...
user avatar
  • 401
1 vote
2 answers
628 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 ...
user avatar
  • 495
0 votes
2 answers
79 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 ...
user avatar
  • 495
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. ...
user avatar
  • 21
2 votes
1 answer
483 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 ...
user avatar
  • 21
2 votes
1 answer
199 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 ...
user avatar
2 votes
1 answer
553 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 ...
user avatar
0 votes
1 answer
599 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 ...
user avatar
1 vote
0 answers
77 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 ...
user avatar
  • 19
5 votes
1 answer
995 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 ...
user avatar
  • 6,350
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 ...
user avatar
  • 307
2 votes
1 answer
297 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 ...
user avatar
  • 278
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 ...
user avatar
2 votes
1 answer
1k 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->...
user avatar
7 votes
1 answer
9k 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 ...
user avatar
  • 2,737
2 votes
1 answer
699 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: ...
user avatar
8 votes
1 answer
915 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 ...
user avatar
7 votes
2 answers
1k 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 ...
user avatar
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"...
user avatar
1 vote
1 answer
223 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); ...
user avatar
2 votes
0 answers
475 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 ...
user avatar
1 vote
0 answers
630 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) ...
user avatar
2 votes
1 answer
966 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 ...
user avatar