OliverHennhoefer / arcpy-supercluster

Python-Implementation of the Spatial Clustering Algorithm 'Supercluster' for ArcGIS and ArcPy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ArcPy "Supercluster" algorithm for ArcGIS

An Implementation of the simple and fast spatial clustering algorithm 'supercluster' (e.g. used by Mapbox) for ArcGIS that efficiently clusters huge datasets of points. Primarily suitable for creating maps of smaller scales.

đź“— Trial project. Primarily implemented to get familiar with the python syntax and the ArcPy interface for ArcGIS.

Parameters:

  • Input: FeatureClass (Point)
  • Input: Cluster radius (in meter)
  • Output: FeatureClass (Point)

Steps:

  1. Start with a random point of the dataset
  2. Find every point that lies within the given radius around this point
  3. Form a cluster with the nearby points
  4. Randomly select a new point of the dataset that isn't part of a cluster and repeat the previous steps.

Result:

Original point data
Result for a (cluster-)radius of 500 meters
Result for a (cluster-)radius of 1000 meters

alt text Note: Since the algorithm randomly chooses points for clustering, the results vary for every application of 'supercluster'

Future Improvements:

  • Calculate the mean position out of the points of one cluster to get more representative cluster locations.
  • Add the possibility to fit additional attributes to the corresponding cluster (e.g. by calculating the mean for the points of the same cluster)

About

Python-Implementation of the Spatial Clustering Algorithm 'Supercluster' for ArcGIS and ArcPy.


Languages

Language:Python 100.0%