1

In my line of work I receive excel spreadsheets with records of notable/protected species in a particular area.

I would like to style them so that the shape denotes their Taxon Group, and their colour denotes their Common Name.

I realise I could separate the taxon groups out into different shapefile layers and style them that way, but I use 'point displacement' and don't want the points to stack on top of each other.

I have also tried using the field calculator to combine 'Taxon Group' and 'Common Name' but this changes how they appear in the key.

3 Answers 3

2

Here I have used Rule-based symbology to define the shape (for the taxon). Then used the Data Defined Override for the symbol fill colour within each rule (for the common name). I had the colours added as an attribute in the table, but you could use an expression to define them.

  • Double-click a rule to edit its symbology and choose your desired shape
  • Then for the Fill Colour, click the data-defined override button and choose Edit:

enter image description here

My expression was just "colour" as I had already defined the colours in the attribute table using the field calculator. I did this for each of the 3 rules:

enter image description here

enter image description here

An example expression to define the colours:

CASE 
    WHEN "common_name" = 'grass snake' THEN 'lightblue'
    WHEN "common_name" = 'adder' THEN 'darkblue'
END

1

Here's how I would do it :

In the style tab, use Categorized and in the value,

if count(concat("taxon group", "common name"))>0, concat("taxon group", ' - ', "common name"), null)

Then, hit Classify and you should get a certain number of classes in random color where a combination of taxon group and common name can be found at least once.

For example, here I have geolocalized pictures classified by brand and model : enter image description here

For the shape part, I don't know how to randomize that except by maybe using the geometry generator as a symbol or set up manually a shape for each taxon group/common name.

0

Taking into account what you have already done, I find several options, I will start with the ones that could be simpler, although not for that reason better:

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.