3

I use QGIS 3.22.2 and I have points datasets of records from ecology surveys with column of "ID" of individual record and column "Species" with few different values (for example: 'Pip', 'Pop', 'Pep' and 'Pap') and I need to make rule based symbology with different symbols for different "Species", almost all of records from same species will have same offset points (0,0), but to avoid points overlapping I need for some records of same "Species" - for example: "Species"='Pip' - with given particular "ID" - for example "ID"='2' I would like to have offset points set up on (3,4) and for "ID"='5' I would like to have offset points set up on (5,6), etc.

How and where I can set up this kind of Rule-based symbology in QGIS?

1 Answer 1

2

You can use the data defined override of the symbol offset x and y with an expression, like so:

enter image description here

Expression
case 
    when $id = 2 then '3,4'
    when $id = 5 then '5,6'
    --else '7,8' -- you can also use `else` in a `case` statement (delete the leading -- to uncomment)
end

If you don't use else in the above statement, the ids not caught by the expression (everything other than 2 and 5) will be unaffected (0,0 offset).

Result

enter image description here

I use the Meters at scale measurement unit for some extra distance in my screenshot

2

Your Answer

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

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