Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features count shows zero for 'all other values' when doing categorized symbology and features values are NULL #52690

Open
2 tasks done
stefanon opened this issue Apr 14, 2023 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers

Comments

@stefanon
Copy link

stefanon commented Apr 14, 2023

What is the bug or the crash?

When I apply a categorized symbology to a vector layer and the features values contain NULLs the features count when activated, shows a value of 'zero' features instead of the number of those with value NULL . The attribute values are A,B,C,D and NULL, and the style looks like in figure, where the 'all other values' count is set to zero:

image
The same layer when applying a rule based style, inserting a rule for null values looks like :

image

Steps to reproduce the issue

Assign a categorized style to a vector layer for features that contain some NULL values, and then activate the 'show features count' for the layer.

Versions

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.30.1-'s-Hertogenbosch QGIS code revision 447e8d7
Qt version 5.15.3
Python version 3.10.6
GDAL/OGR version 3.4.1
PROJ version 8.2.1
EPSG Registry database version v10.041 (2021-12-03)
GEOS version 3.10.2-CAPI-1.16.0
SQLite version 3.37.2
PDAL version 2.3.0
PostgreSQL client version unknown
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Ubuntu 22.04.2 LTS
       
Active Python plugins
ProjectPackager 0.7.1
latlontools 3.6.9
GroupStats 2.2.7
batchvectorlayersaver 0.9
grassprovider 2.12.99
processing 2.12.99
db_manager 0.1.20
QGIS version 3.30.1-'s-Hertogenbosch QGIS code revision [447e8d7](https://github.com/qgis/QGIS/commit/447e8d717a) Qt version 5.15.3 Python version 3.10.6 GDAL/OGR version 3.4.1 PROJ version 8.2.1 EPSG Registry database version v10.041 (2021-12-03) GEOS version 3.10.2-CAPI-1.16.0 SQLite version 3.37.2 PDAL version 2.3.0 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.4 QScintilla2 version 2.11.6 OS version Ubuntu 22.04.2 LTS

Active Python plugins
ProjectPackager
0.7.1
latlontools
3.6.9
GroupStats
2.2.7
batchvectorlayersaver
0.9
grassprovider
2.12.99
processing
2.12.99
db_manager
0.1.20

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@stefanon stefanon added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Apr 14, 2023
@rnousia
Copy link

rnousia commented Apr 21, 2023

I tested the issue with different dataproviders using QGIS 3.30.1 (Linux Mint 21.1) and managed to reproduce it with all tested dataproviders (scratch layer, postgis layer, geopackage). Integer fields work fine, so it seems to be a problem with a text field? I also noticed that counts do work correctly if the style is copied from layer to another. But reclassifying layer will set the count of "All other values" back to 0.

categorized-style-bug

rnousia added a commit to rnousia/QGIS that referenced this issue Apr 22, 2023
rnousia added a commit to rnousia/QGIS that referenced this issue May 28, 2023
@alexbruy alexbruy added Symbology Related to vector layer symbology or renderers Vectors Related to general vector layer handling (not specific data formats) and removed Vectors Related to general vector layer handling (not specific data formats) labels Nov 3, 2023
@jon-m-l
Copy link

jon-m-l commented Apr 18, 2024

still an annoying bug.
the feature count can also be updated by clicking into the 'all other values' field and save it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

No branches or pull requests

4 participants