How to create centroid of points within a certain radius?

5341
10
11-16-2010 07:51 AM
BinCai
by
New Contributor
We have ~30k points and points close to each other (for example 50 meters or less) should be grouped together as one point (centroid), as shown in attached screenshot (green dots are points we have and blue dots are centroids we want). ET Geowizards can do it but we the demo version has limit of 100 features. Is there any other free tool or method can do it? Thanks!

Bin
0 Kudos
10 Replies
DuncanHornby
MVP Notable Contributor
Bin,

If ET Geowizard works for you, why don't you buy it and support it's continued development?

Also have a look at the Measuring Geographic Distributions toolset in the Spatial Statistics toolbox.

Duncan
0 Kudos
BinCai
by
New Contributor
Thanks, Duncan. My boss doesn't want to pay for it. 😞
I will check the measuring toolset.
0 Kudos
DanPatterson_Retired
MVP Emeritus
How accurately do you need the centroid?
Are the clusters identified with a particular attribute?  If so, then a bounding container of some form (ie extent rectangle, min area bounding rectangle, convex hull), followed by a centroid or label point determination might be reasonable.
If the clusters have no identified attribute which can separate the clusters, then perhaps a dissolved buffer of some reasonable distance to ensure polygons with no holes, followed by a similar centrality point determination might suffice.
otherwise, you may have to resort to other clustering algorithms (k-means?) etc.
In any event, your 30k points may have to be batched into separate geographic regions followed by a merge.
If your example is not really representative of the actual patterning in your data, then all bets are off until further information can be provided
0 Kudos
LaurenRosenshein
New Contributor III
Hi Bin,

Another option for this type of grouping is to start with the Integrate tool (Data Management), which allows you to snap features together that are within a specified distance of each other.  The integrate tool will change the coordinates of all input features so that those features within a specified distance of each other will be coincident.  Please note that the Integrate tool will change your input feature class, so it is always a good idea to run Copy Features beforehand to ensure that you do not lose your original data.  Once you have run Integrate, you can use the Collect Events tool from the Spatial Statistics toolbox to create a count of the number of coincident points at each location. 

This workflow is detailed in the Hot Spot Analysis Tutorial as a way to aggregate incident data for a hot spot analysis.  The tutorial provides step-by-step instructions on creating a model to Integrate and then Collect Events using point data. 

Hope this helps!

Lauren Rosenshein
Geoprocessing Product Engineer

Check out the latest Spatial Statistics resources at http://bit.ly/spatialstats!
0 Kudos
LaurenRosenshein
New Contributor III
That is a great question, Bill!  So great, in fact, that I had to go ask a colleague down the hall.  🙂  The response that I got is as follows:

A given point can move up to 1.4 X the cluster tolerance, but it�??s an iterative process, so the movement of a point, could move it within the cluster tolerance of other points, and shift it further.  I think in this case, yes, all the points will shift, and will shift to the center of the grouping (2.5, 0).

My colleague also pointed me to the help topic, Topology in ArcGIS, which I think you will find provides a lot of additional information on cluster tolerances.

Hope this helps!

Lauren
0 Kudos
ChrisSnyder
Regular Contributor III
I wrote a Python script that would get you part way there: http://forums.arcgis.com/threads/17809-polygon-in-polygon-analysis-count-if?p=56528&viewfull=1#post5...

The script basically does a recursive SelectByLocation (maybe specify 1 mile selction radius?). The FC then gets a CLUSTER_ID field (you can name it whatever you want) added and populated. So if there were three "clusters" of points that were > 1 mile appart (but the points in the cluster were all < 1 mile appart) you would end up with 3 different CLUSTER_ID values. Then all you need to do is add the X and Y coordinates to the table, run the Summary Statistics tool (using CLUSTER_ID as the case field, and getting the mean X and Y coordinate values). Build a new FC based on teh output of the summary stats table. Presto.
0 Kudos
DanPatterson_Retired
MVP Emeritus
Given Bill's interesting example, what is returned...and what should be considered a cluster given such a circumstance?
0 Kudos
AdrianRingenbach
New Contributor
I wrote a Python script that would get you part way there: http://forums.arcgis.com/threads/17809-polygon-in-polygon-analysis-count-if?p=56528&viewfull=1#post5...

The script basically does a recursive SelectByLocation (maybe specify 1 mile selction radius?). The FC then gets a CLUSTER_ID field (you can name it whatever you want) added and populated. So if there were three "clusters" of points that were > 1 mile appart (but the points in the cluster were all < 1 mile appart) you would end up with 3 different CLUSTER_ID values. Then all you need to do is add the X and Y coordinates to the table, run the Summary Statistics tool (using CLUSTER_ID as the case field, and getting the mean X and Y coordinate values). Build a new FC based on teh output of the summary stats table. Presto.






Hi csny490

I've got a similar problem as it is  mentioned here in this Thread and I think, your python script would solve it perfectly! unfortunately, it's not available anymore under the link you pasted here. Could you upload it again? Or could you sent it to me personally?

Thanks a lot!

rinadr
0 Kudos
AdrianRingenbach
New Contributor
csny490;57040 wrote:
The script basically does a recursive SelectByLocation [..]. The FC then gets a
CLUSTER_ID field (you can name it whatever you want) added and populated.

To be more precise: I dont nead a centroid Point as above mentioned, I need a function or a script, that populates a new field in the Attribute table with a ID which is different for every cluster.

Thanks a lot!
0 Kudos