Geographic Information Systems Asked by Jodie on November 24, 2020
I have a dataset that includes populations and subpopulations, so for each main population there may be several subpopulations. I have organised this in the table so that a population has the same code, and then in a separate column if it is a subpopulation then it has been given a letter ‘a, b, c, d, etc’ with the ‘main’ populations all having a blank cell under the subpopulation column. For example:
So in the above dataset, row no. 1 is the main population and has the accompanying subpop code column is blank/null and it has 8 subpopulations (a-h).
Is there some way, some expression I can use, under symbology to give all ‘main populations’ i.e. those with a NULL subpopulation code a particular symbol and all those populations where the subpopulation code column is NOT NULL another symbol? I have many different species, so ideally I would like the main population for each species to be a different colour, but a larger point dot. And all the subpopulations for each species to have the same colour as the main population but be a smaller dot.
So essentially showing something that looks like the above map. I just used filters to get this result and created a duplicate layer so that I could set the symbology differently for each.
Really hope that makes sense! I am still learning QGIS and know the basics, but just starting to get my head around using more advanced features.
Would appreciate any advice you can provide and if there’s a better way to tabulate the data.
Thanks a bunch!
Mapping plant populations- that's right up my alley!
You can use rule based symbology and rule based labeling to replicate your example above.
Just use the simple IS NULL
or IS NOT NULL
filter.
Below is a simple example I set up on a test point layer (Mine happens to be Acacia tolmerensis), I just added a couple of columns to my attribute table to look similar to yours.
In the layer properties dialog under the symbology tab select Rule-based. Double click the row to edit the filter for the first rule. Create one rule for each filter you want and set your desired symbology (marker size, colour etc.). Use the green plus sign to add more rules. You can add as many additional rules as you like.
Symbology dialog:
Then do the same for with labeling rules.
You can double click on any row in either dialog to edit a rule's filter, symbology or label.
Labeling dialog:
Result:
Answered by Ben W on November 24, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP