Point cluster renderers are used frequently in web mapping applications to condense multiple overlapping or nearby points into a single rendered marker for clarity. QGIS currently supports rendering points using a similar “displacement” renderer, which automatically shifts rendered points to avoid overlap, but has no support for clustering points into a single rendered marker.
We’d love to fix this, but need your help to make this possible! By pledging to contribute to this crowd funding campaign you will allow us to undertake the work required to add a fast and feature-filled cluster renderer directly within QGIS. Read on for details about what we propose and how you can get involved…
Campaign concluded successfully 5 September 2016
Hall of fame
This crowdfunding campaign was successful thanks to contributions from:
- Andreas Neumann
- Qtibia Engineering (Tudor Barascu)
- Karl-Magnus Jönsson
- Geonesia (Nicolas Ponzo)
Plus numerous additional anonymous backers whose generous contributions are also highly valued!
How it works
Crowd funding operates by multiple organisations (or individuals!) each pledging to contribute part of the campaign’s funding goals. For the point cluster campaign, we require 2,300€ to make this feature a reality. You can contribute part (or all) of these funds. If the funding goal is NOT reached by the campaign deadline, then no contributions are payable and the feature will not be added to QGIS.
If you’d like to see QGIS gain support for point clustering, then your contributions are vital! Pledge, or publicise, this campaign to help it reach the funding goal before the August 31 deadline!
About the feature
QGIS already has support for tons of different point layers renderers, including the standard categorised and graduated renderers and all the way through to specialised renderers like the live heatmap renderer and the displacement renderer. The “Point Cluster” renderer will be added alongside these as a new option for point layers:
Code consolidation is always a good idea, so to facilitate the new Point Cluster renderer we’ll be reusing parts of the existing code for the “displacement” renderer. Since both the existing displacement renderer and the new cluster renderer will share a common code base, the new cluster renderer will share the same options as are available in the displacement renderer for distance tolerance and sub-renderer settings. The screenshot above shows a mockup of the properties page for the new point cluster renderer, including the settings for sub renderer and point distance tolerance.
You’ll see there’s also an option for setting the “Cluster symbol“. This symbol will be drawn whenever two or more points are within the specified “point distance tolerance”. If a point is isolated and has no other nearby points, it will be drawn using the default appearance from the specified renderer (eg points can still be styled using categorised, graduated or rule based renderers in conjunction with the cluster renderer). But if multiple points are clustered together they will instead be drawn using the cluster symbol.
Here’s where things get really powerful… To allow for custom styling of the “cluster symbol”, two expression variables will be made available for use in data-defined symbol overrides for the cluster symbol:
- @cluster_size: this will be set to the number of points contained within the current cluster. This variable could be used to scale the size of the rendered cluster marker, or used along with the font marker symbol to draw the number of clustered points inside the cluster marker, or even used with the ramp_color function to vary the color of the symbol.
- @cluster_color: if all points contained within the current cluster share the same symbol color (ie, if they are from the same category class or graduated range), then the @cluster_color variable will be set to match this color. If the points are from mixed classes then @cluster_color will be null. This variable can be used along with data-defined colors to alter the appearance of a cluster to inherit the same color as the symbols contained within the cluster.
Data defined symbol properties are one part of what makes QGIS’ symbology so powerful, so rest assured that we’ll be designing the cluster renderer in a way that allows you to take full advantage of these properties! Eg, the below screenshot shows a mock-up of the cluster renderer used with a base categorised renderer (see the legend in the layers panel on the left), and taking advantage of the @cluster_size variable to both scale the clustered markers and show their size and the @cluster_color to shade the clusters in the same color as the grouped points (and resorting to a black cluster marker for mixed clusters):
The mockup also demonstrates how the markers could be further styled with a drop shadow through the use of QGIS’ existing layer effects functionality. And of course, the new renderer will also work perfectly alongside the live layer styling panel introduced in QGIS 2.16.
This work will be targeted to the QGIS 3.0 release, scheduled for release early next year.
Some important thing to note
- Unlike the web mapping version of cluster markers, cluster markers in QGIS will NOT be interactive and a user would need to zoom into the map to “break-apart” the cluster and show the individual points contained within.
- We believe that unit testing leads to stable software, and should be a prerequisite for all sponsored work for QGIS. So it goes without saying that the proposed changes will be soaked in regression unit tests covering the non-GUI portion of the changes to ensure that they are stable and will not break in future QGIS releases! (Seriously – if your developer isn’t implementing regression tests as a standard part of your sponsored features, then you’re only getting half of what you’re paying for and it’s probably time to revisit your contracts)
We understand that it can be difficult for organisations to approve contributing to a crowd-funding effort, so we’re trying to make this process as painless as possible:
- To contribute to the campaign, just email email@example.com and let us know your details and how much you will be contributing to the goal. The minimum pledge we will accept is 200€ (or equivalent).
- We will contact you to discuss payment options – but NO payment is required in advance!
- If (and ONLY if!) the campaign is successful we will invoice you directly for your pledged amount. Payment in full will be required within 14 days of the campaign’s completion. (Please contact us to discuss if you need different payment terms).
- When we have received all pledged funds we will undertake the work detailed above, and provide regular updates as we go.
We believe this system should give organisations confidence that contributing to the campaign carries no risk and is compatible with their organisation’s accounting procedures. If however you have concerns or would like to contribute in another form, just contact us to discuss further!
- What happens if contributions exceed the campaign goal?
If contributions are in excess of the stated goal, we will reinvest the excess back into QGIS by using it to fund some of our other ongoing QGIS contributions, such as the multithreaded background task manager demonstrated here. This will be done in a transparent and accountable way, and we will openly report on the ways additional funds are being used.
This work will be undertaken by North Road’s founder, Nyall Dawson. Nyall has an established history with QGIS development, and in recent years has been one of the most prolific contributors to the project.
At North Road we invest back into the open-source geospatial community. We do large amounts of volunteer fixes and feature additions across the open source geospatial stack, so by investing in us you also help support us improve the open source GIS stack.
We use the software we develop daily, so we take pride in developing stable, polished code with extensive regression testing and refined workflows. We offer long-term support for the code we create, providing proactive fixes and improvements even after a project is complete. Our development record demonstrates the confidence you can place in us for timely delivery of this crowd funding campaign’s product.