1

I'm an absolute QGIS beginner (only used it once before for a class) but I am trying to make a cluster map with data coming from a witch trial in Switzerland. Effectively, each time a location is mentioned in the trial, I recorded the location. I want my map to have different icons based on the number of mentions of each space across the length of the trials.

This question shows what the end result for me would look like: Point Cluster in QGIS and Legend

However, I cannot seem to get the data on the number of mentions to appear on the map.

I have uploaded the location data as a .kml file from Google Earth. The map looks like this: enter image description here

I then open the attributes table and add a "weight" field, and input the number of mentions made of each location

enter image description here

However, once I do this, the following error message appears, and the value I have inputted has disappeared: enter image description here

Could anyone direct me to a solution here?

I am a true beginner with the software and really have no experience with troubleshooting these issues.

4
  • You really mean cluster size or you simply want to draw your points with varying size, depending on a value in your attribute table? A cluster collects nearby points to a common symbol. Your weight field contains just one number, all others are empty, so there is not much to visualize....(?)
    – Babel
    Commented Mar 16, 2021 at 22:05
  • That is part of the problem, when I enter data into my weight field, QGIS just gives me the error message and deletes the numbers I have entered in the field. Is there a solution to this? Thanks!
    – Aaron
    Commented Mar 17, 2021 at 18:11
  • 1
    I see. The problem probably is that you use a kml file: this cannot be edited in QGIS. Save it as Geopackage and than you should be able to edit the attributes.
    – Babel
    Commented Mar 17, 2021 at 19:53
  • Brilliant! That worked! Thank you!
    – Aaron
    Commented Mar 18, 2021 at 5:29

1 Answer 1

8

If you want to change the size of a point symbol according to an attribute value, click the data driven override icon next to the size setting of the layer's Layer Styling panel and select assistant:

enter image description here

Choose the source (the attribute) you want to use, load the min/max values with the double arrows and set the size of the smallest and biggest symbol (and change scale method, if you want):

enter image description here

In this case, the result is quite messy. You could apply transparency and/or layer or feature blending modes to see the points better. Also be sure to order the symbols in a way the the smallest ones are on top, the bigger ones in the background: For this, at the very bottom expand Layer Rendering and check the box next to Control feature rendering order, than click the a[arrow]Z symbol on the right. In the dialog that opens select the same attribute as expression and select descending.

enter image description here

However, it still looks messy. You could now cluster together points that are too close to each other to be distinguished as individual points. For this, set the symbol rendering mode to Point cluster. See how the map changes:

enter image description here

To change the size of the red (clustered) symbols, in the screenshot above click the entry Cluster Symbol (red circle with A) to open the styling dialog of the cluster symbol. There again use the same method as above (assistant) for a data driven override of the cluster symbol: you can do this only for the simple marker symbol layer (see screenshot) and/or also for the Font marker. See the result:

enter image description here

Back in the main Layer Styling panel, you could increase the distance: thus more points will be "collected" together to a cluster symbol (all points in the defined distance):

enter image description here

As you can see above, the size of the circles does not correspond to the numbers contained. This is because the size depends on a value in the attribute tabel, whereas the number represent the amount of points clustered. If you want both to correspond, change either the size or the font marker.

To change the cluster size: in data driven override, don't select assistant, but edit.... Introduce @cluster_size. I set it to @cluster_size/10, dividing it by 10, otherwise it would have been too big - see yellow highlighte part on the screenshot:

enter image description here

To change the Font Marker, select it and apply the same settings as above - but be sure this time to change the size as well as the font:

enter image description here

In a similar way, you can define more data driven overrides, e.g. the color of the symbol: select the data driven override icon next to the color and proceed as before, but this time select a color ramp:

enter image description here

And than, there's also the Heatmap rendering mode: set a color ramp, a radius, a max. value and use Weight points by an attribute (if it is the case) - otherwise, it will only show the density of the points:

enter image description here

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.