Created
May 17, 2012 23:16
-
-
Save hampelm/2722214 to your computer and use it in GitHub Desktop.
Parcel clustering algorithm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = maximum number of parcels that can be in a cluster | |
Get list of parcels to survey. | |
Create an empty list of clusters. | |
Find top-leftmost parcel. | |
Find up to n-1 parcels that border that parcel. | |
Only select parcels with the same street name. | |
Only select parcels that aren't already in a cluster | |
Put the selected parcels in the same cluster. | |
If there are are less than n parcels in the cluster, repeat the process | |
to find bordering parcels, but use the second parcel in the cluster. | |
(if no bordering parcels are found, what to do?) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment