Does anybody have a methodology to return the "top 3" closest point features from another point feature class?
I have two point datasets. For each record in one dataset, I want to find the top 3 closest dataset in another.
The "Near Analysis" returns only one closest feature.
You have the point distance tool Point Distance—Help | ArcGIS for Desktop
but the results could obviously be quite large. a search radius would reduce this but obviously might not suit most use cases.
When you get the table you could then wrangle it, something like create a cursor and produce a dictionary of all input OIDs as a key, the value being a list of a list - [[distance, OID], [distance, OID], [distance, OID]....]. Iterate over the dictionary, sort the values and select the 3 smallest values and grab the OIDs.
This wouldn't be very hard to implement, though I do hope someone has a more trivial way.
What about Generate Near Table (Analysis)—ArcGIS Pro | Documentation? (Pro or ArcMap)
I know the Find Nearest tool in ArcGIS Insights does this rather easily. In the UI, one can limit the search to a certain number of features and/or a distance.