I'm using ArcGIS 10.3 for Desktop.
I have two point datasets:
- The first point file contains bus delay events (e.g., due to traffic, signal delay, passenger on/offs etc.) along a number of routes and during different times of day. Each delay event has a "Run_ID" attributed to it, which corresponds to the bus run (e.g., Route 28A northbound, run # 55 on July 25, 2015).
- The second point file contains the bus locations collected at 1 second intervals for each bus run in the system corresponding to a "Run_ID".
My objective is to roughly approximate time associated with each delay point in the first dataset. To do this, I've figured I can use a the Spatial Join tool in ArcMap to count the number of bus GPS points that fall within a certain radius of the delay point. The count of these points would translate into the number of seconds (since the GPS points are taken every second). I can do this in isolation with one single run (i.e. unique Run_ID), but I have a massive dataset with delay points and bus locations corresponding to thousands of Run_IDs.
Is there a way to do a spatial join with a conditional statement at the outset?