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?
-
Have you tried using a Definition Query to provide your "conditional statement" on an input to your Spatial Join?PolyGeo– PolyGeo ♦2016年07月18日 05:08:35 +00:00Commented Jul 18, 2016 at 5:08
1 Answer 1
If I have conceptualized this properly, you should be able to use Field Map in the Spatial Join tool to do this. If both point classes contain the Run_ID:
use the field map to add an additional field to the output
then add both Run_ID fields as input to the new field.
Right click and from the Merge Rule option select count
The resulting spatial join point class should have that field populated with a count all points within your criteria for that field
Explore related questions
See similar questions with these tags.