I am using ArcGIS desktop. I want to run a tool to find all points that are close to each other within a specific distance.
What is the fastest and best tool to use? I am using the standard arcgis with the Spatial Analyst extension.
To do this I would use the Point Distance tool which:
Determines the distances from input point features to all points in the near features within a specified search radius.
The best way for points if you have a large number is to use the geohash module for Python. This is hundreds of times faster than Near and very flexible. But if you only have a few, just use Near. http://en.wikipedia.org/wiki/Geohash
import Geohash
# .... make a dictionary of the point coordinates
for row in arcpy.SearchCursor(inputFC):
d[row.getValue(pk)] = [row.getValue(keyatt),
Geohash.encode((row.shape.firstPoint.Y),(row.shape.firstPoint.X),precision=10)]
# ... compare the dictionaries, if they are the same geohash they are within the same tolerance.
def valuesChanged(dict1, dict2,sBoth):
'''get a list of keys from one dict if a corresponding dict's values are different'''
outList = [key for key in sBoth if dict1.get(key) != dict2.get(key)]
return outList
Near (Analysis)
works that does solve this problem?