1

I've imported wildlife species sightings with individual sightings plotted. I now want to be able to display these sightings with more detail, firstly by assigning a shape to the "Class" (e.g. birds, mammals, reptiles) of animal, and secondly assigning colour to the actual species within each class. Hopefully that isn't too general or unclear.

3
  • 2
    What platform/software do you use? Jan 25, 2022 at 1:23
  • 1
    Working in QGIS. Sighting data is imported from a .csv document
    – Max
    Jan 25, 2022 at 1:57
  • How about a picture of what you want things to look like?
    – Pointdump
    Jan 25, 2022 at 7:11

1 Answer 1

2

You can achieve what you want using rule based labeling. It looks more complicated than it is. Assume you have an attribute table with classes A, B, C and species 1, 2, 3 as below:

enter image description here

Go into the layer properties and chose "Rule based" in the section "Symbology":

enter image description here

Now you will have to create new sets of rules for your classes and species and choose symbols for them. In the example below I set a square for the rule "class" = 'A': enter image description here

You can do the same with different symbols for your classes B and C. It should afterwards look like this:

enter image description here

Now, there are several ways to link the color to the species, but the easiest is, to click on the one of your rules and select "Refine selected rule" and than "Add categories to rule" in the lower left corner:

enter image description here

Now you can chose your species-column as a category-column for the colours and chose colors you like. Repeat this for all your class-rules and your style should look something like this:

enter image description here

The resulting map should now display different colors and symbols for different species and classes:

enter image description here

There are several more ways to change colors based on rules (e.g. data defined override). But for your example, this should be sufficient.

1
  • This way is easier than data defined override if you want to modify your symbology (you see all category at the same place and you don't need to reinterpret several expression, also the sigma symbol will give you a count for each categorie and tell you if your expression create duplicate)
    – J.R
    Jan 25, 2022 at 9:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.