3

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 Jul 18 '16 at 5:08
2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.