7

I'm trying to visualize crimes based on if the crime happened during day or night time. I've tried using the point displacement tool but I'm not satisfied with the results because the readability for certain scale levels is too low and the results also overlap: enter image description here

So instead I followed Anita Grasers guide and tried using the point clustering-tool but I can't think of a way to separate day/night crimes without duplicating the layer and setting different offsets: enter image description here

Ultimately I want to show the clusters including the exact amount of crimes separated by day and/night without having overlapping feature symbology. So I tried to accomplish this for one category by using the below expression but the results are not correct, the total count is not aggregating correctly:

CASE 
WHEN 
"day_night" = "day" THEN @cluster_size
END

Using point cluster symbology in one layer, how can I re-write the expression above to correctly count the numbers of day/nigh crimes separately and visualize it without overlaps?

  • Why are you opposed to duplicating the layer? Would you be willing to use virtual layers? – csk Mar 14 '18 at 16:53
  • I'm not opposed to duplicating the layer, that's how my latest work-around is set up. I'm opposed to having to do manual point displacement since duplicating them (one for day and one for night) = overlaps. But qgis could handle the point displacement for me if I could use day/night from one label?! Or I'm I missing something really basic here? – johlund Mar 14 '18 at 23:32
  • Are you using the categorized renderer setting? – csk Mar 15 '18 at 14:11
  • 1
    I just tested the categorized setting, and I see that it clumps all categories together into one cluster. That seems like a flaw in the tool. It would be nice to at least have the option of separate clusters for different categories. – csk Mar 15 '18 at 14:20
  • @csk you nailed the problem in one sentence, i clumps all categories into one cluster. But I'm thinking there should be a way around it, at least if you're good at writing expressions? – johlund Mar 16 '18 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.