# How to find ID's of nearest stations (points) in a specific radius

I am using ArcGIS 10.0 and I am doing rainfall data analysis.

I have a single layer including more than 1,000 stations (points) and I need name (STATION_NO) of neighbor stations in more than one specific distance for each station. I've tried all PROXIMITY options in Arctoolbox, but the outputs were not what I expected.

For example: I need to know the name of 5 nearest stations in a radius of 50Km.

• Use Spatial Join. You can concatenate string in text field, which would be your Stat. Name. Commented Sep 12, 2014 at 5:52

There is an arcInfo tool called generate near table to do that, but I guess that you don't have it the advanced licence if you ask the question. You can thus try the GME pointdistance tool.

Here is a pure ArcGIS workaround, but it can be long.

• create a buffer of 50 km around each point

• then you can use "spatial join" with the "ONE_TO_MANY" option to
extract the ID of each buffer that contains your point.

• The problem is that you could have more than 5 points in some cases. For those points you'll need to loop on each point (select the
point), spatial join your set of point to the selected point, and
extract the ones with the smallest distance.

• I have 'generate near table'. But I can not understand the logic of output table. Commented Sep 12, 2014 at 6:00
• You have one row for each neighbor within the search radius. For each row, IN_FID is the ID of "reference" point and NEAR_FID is the ID af the closest points to the reference point. You can thus join by attribute the FID of your origin table with the NEAR_ID in order to get you 3station_ID" value. The other field do not matter in your case. Commented Sep 12, 2014 at 6:15
• But, the thing is, when I am trying to join NEAR_ID with STATION_NO, it returns null value in STATION_NO column. Commented Sep 12, 2014 at 6:38
• you need to join NEAR_FID based on the FID of your main table in order to get your STATION_NO in the table. Commented Sep 12, 2014 at 6:40
• based on the image on your post and with the same idea as with the neighbor (you could also do a join), the FID of the first reference point is "0"(see "IN_FID" field), so the STATION_NO of this point is 1334108 (see FID = 0 in the Main table) Commented Sep 12, 2014 at 7:06