Hi,
for a project (python standalone) I try to display points in "clusters" (like the Leaflet-marker-Cluster http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html, or Openlayers, etc. just a simple distance based solution). As far as I understand the PointDisplacementRenderer more or less it does the same: group all points in a radius into a cluster and show the center point. If the tolerance is set depending on the scale the center points are displayed properly.
I looked into the docs and the source code and didn't found a way to access the list of displacementGroups (to get the count and the center point) or just the count of points in each group. After that I tried to modify the source code of the renderer. I made the mDisplacementGroups publicly accessable (or i tried to do so) and moved the:
typedef QMap<QgsFeatureId, QgsFeature> DisplacementGroup;
/**Groups of features that have the same position*/
QList<DisplacementGroup> mDisplacementGroups;
/**Mapping from feature ID to its group index*/
/**Groups of features that have the same position*/
QList<DisplacementGroup> mDisplacementGroups;
/**Mapping from feature ID to its group index*/
above the private section but it didn't worked. Is this completly wrong or do I have to change something else to get access with the python bindings?
Is there any way to get the center point of each group and the count from the current implementation?
I didn't found something in the mailing list or somewhere else: is someone working on a "visual clustering" solution?
Greetings
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
