I used the "graduated" style option to represent data by year.

enter image description here

Then for each year I used this method with a custom function to increase point size according to the number of points at the same location. increasing marker...

It works well but QGIS takes more than 30 minutes to display and the same time to save the map using composer. It often just stops.

Is there another way, faster, to get this result?

I'm using QGIS 2.12.

Here a part of what I would like to obtain (using increasing markers size...)

enter image description here

Here what I obtained with csk suggestion : new field creation, convex hull and centroid extraction enter image description here something is probably wrong.

Finally, I used this method which allow to draw points with size relative to the frequency at one location. It is very fast and uses both fied calculator as suggested, but a categorized symbology based on the new field. Increasing marker size based on frequency...

1 Answer 1


This method should work, but I wasn't able to test it because QGIS won't work properly for me today (my computer is in a bad mood, I guess). Let me know if you run into any issues and I'll try to address them.

  1. Create a new field, "date_range", which has the starting date (or the ending date, or the date in the middle of the range, whichever makes more sense to you) of the date range for each category. Use the Field Calculator and an expression like:

    WHEN "datefield">=1841 AND "datefield"<1870 THEN 1841
    WHEN "datefield">=1870 AND "datefield"<1914 THEN 1870
  2. Create a convex hull for the points in each "date_range", using the minimum bounding geometry algorithm (Processing toolbox).

  3. Extract the centroids of the convex hulls
  4. Symbolize the centroids layer in a graduated symbology based on the "date_range" field. Use data-defined settings to control the symbol size based on how many points went into the original convex hull. (Hopefully there's a field with this information already, otherwise you'll need to create it.)
  • I tried but the expression is not valid, I cannot go further. I replace "datefield" by the name of the column containing the date. Thanks
    – catindri
    Commented Jun 4, 2019 at 21:30
  • Did you also replace (etc.) with additional lines of WHEN condition THEN result for each of your date range categories?
    – csk
    Commented Jun 4, 2019 at 21:36
  • yes of course, the message is Erreur d'analyse: syntax error, unexpected LT Erreur d'évaluation: No node at the root !
    – catindri
    Commented Jun 4, 2019 at 21:41
  • (indentation and line breaks are respected in the Expression window) CASE WHEN "ANNEE_COLL" >1841 AND "ANNEE_COLL"=<1870 THEN 1841 WHEN "ANNEE_COLL">1870 AND "ANNEE_COLL"=<1914 THEN 1870 WHEN "ANNEE_COLL" >1914 AND "ANNEE_COLL"=<1947 THEN 1947 WHEN "ANNEE_COLL">1947 AND "ANNEE_COLL"=<1960 THEN 1960 WHEN "ANNEE_COLL" >1960 AND "ANNEE_COLL"=<1990 THEN 1990 WHEN "ANNEE_COLL">1990 AND "ANNEE_COLL"=<2016 THEN 2016 END
    – catindri
    Commented Jun 4, 2019 at 21:51
  • also tried CASE WHEN "ANNEE_COLL" >1841 AND "ANNEE_COLL"=<1870 THEN 1841 END CASE WHEN "ANNEE_COLL" >1870 AND "ANNEE_COLL"=<1914 THEN 1870 END
    – catindri
    Commented Jun 4, 2019 at 21:58

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.