Bug report #20071

"Show feature count" on a rule based renderer gives wrong result for the else statement (again)

Added by Harrissou Santanna about 2 years ago. Updated about 2 years ago.

Status:Open
Priority:High
Assignee:-
Category:Symbology
Affected QGIS version:3.3(master) Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27893

Description

This is a revival of #13999.
In the attached screenshots, I use the Else shortcut in one case and the full rule in the other. counted features are not the same:

1/ The "Route secondaire" level "instead of displaying 0" #20070, would return 296389 in one case (correct!) and, 304445 with the Else rule (corresponding to the whole layer).

2/ At the bottom of the rules, the Autres nature subclass should return 213037 features as of

select count(nature) from layer where importance not in ('1','2') and nature not in ('Bac auto', 'Escalier','Piste cyclable','Sentier','Chemin')

but it instead returns the same value shown at its upper level:
  • 296389 features which is the result of select count(nature) from layer where importance not in ('1','2')
  • or 304445 features with the Else rule used for "Route secondaire".

rulebasedrenderer_Else.png - count are different with (27.5 KB) Harrissou Santanna, 2018-10-10 03:05 PM

rulebasedrenderer.png - The Autres class shows the count of all 0-10001 category features (33.5 KB) Harrissou Santanna, 2018-10-10 03:05 PM

History

#1 Updated by Jürgen Fischer about 2 years ago

  • Description updated (diff)

Also available in: Atom PDF