Geographic Information Systems Asked by Cupain on January 27, 2021
Using QGIS3, I’m making maps with proportional circles based on an attribute value (integer).
When this attribute is NULL, no circle is printed, which is what I expect.
When this attribute is 0, a circle with size 1 is printed ; it should not.
I can’t find any option to solve this.
In my sources, values are considered from 1 to 20 (max value). I tried with 0 as min value, it’s the same.
There is an option to set size when value is NULL, but not 0.
I could set all 0 values as NULL, but i need the 0 to make operations (as sum).
Is there a way not to print circles on 0 values ?
You did not state where and how you create the circles, but from the description I guess you use the size assistant. Simply set the output value to 0 as well, not just the source value:
Other method is to use an expression. You can adapt this solution if you do your circles somewhere else.
Instead of the value of your attribute, use an expression like this here that sets all 0 values to NULL and leaves all others unchanged. Your original data remains unchanged, the expression works just for the creation of the circles. In this example here, I set the size of the circles based on an attribute named "radius". if ("radius"=0, NULL, "radius")
As you can see in the screenshot, points labeled with 0 do not appear (radius = 0, highlighted with red boxes):
Creating circles with the geometry generator works without further adaption, points with 0 values don't draw as circles (or 0-size cirles, a 0 dimensional point):
Correct answer by babel on January 27, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP