The order of the elements is irrelevant and duplicate elements are unwanted. It
is therefore a perfect candidate for a set instead of a list. This prevents
filtering for duplicates manually be replacing some filer codes with (more
performant) builtin methods of QSet.
Groups nearby points into a single rendered marker symbol.
QgsPointDisplacementRenderer has been split into a new
pure virtual QgsPointDistanceRenderer base class which handles the
detection of clusters and grouping of points. The new cluster
renderer reuses this base class to avoid code duplication.
Additionally, some improvements have been made to the
displacement renderer, specifically:
- points are now assigned to the group which is "nearest" them,
rather then just assigning them first group within the search
distance. In some cases this was assigning features to a more
distant cluster, resulting in less predictable cluster patterns
- individual points are now correctly shown in their own
selection state
Lots of code cleanup + documentation too.
Sponsored by:
- 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!