I have: - point GPS for people (time in seconds) - buffer GPS for a car (time in seconds)

What I want to do is for each buffer GPS coordinate, I want to find the number of GPS people points inside of it. The only thing is this is time sensitive. I want to have the Buffer GPS time to be 'set' as the time(range of 10 seconds or so). So each Buffer GPS time, only the people points within the specified time range are selected, and this iterates throughout the entire layer.

Unsure if this is even possible with ArcGIS or ArcPy, but if there are alternative options that could be used to accomplish it would be a great help!

1 Answer 1


I would personally perform the Buffer on all of the car GPS points and Spatial Join them to all of the people points regardless of time using the One to Many option to preserve all of the data for all of the cars and people. Then I could use an Attribute query to select against the time fields to find all people within 5 seconds of every car time: ABS(car_time - people_time) <= 5 seconds. Then I would run Summary Statistics on the selection using the car/time GPS point ID as the case field to get the count of all of the people I selected for each car GPS point. I would join that to the original car GPS points and calculate the count over to the points for display purposes.

This is better in my opinion than using predefined time ranges, since the 10 second window is a shifting range. Also this creates a single output as opposed to multiple outputs for each time window. The time taken to preselect for each time window will be much more time consuming than doing a Spatial Join that overbounds the amount of matches in most cases. Potentially the process should be limited to run for each 24 hour period on the cars and people by placing a definition query on both for a matching 24 hour period before performing the spatial join and creating separate outputs for each day, but I would never do the number of definition queries and spatial joins it would take to isolate every 10 second period separately during a day.

If there are multiple people points for the same person with different times that could fall within a car buffer I would perform two summary statistics, first using both the car/time ID and the person (not time) ID as the case fields to get the rows collapsed down to the individuals who were captured by the time window and then run the Summary by car/time ID to get the count of those people into a single row for each car/time GPS point.

  • For the join I only have one to one or one to many option, no many to many. But I see how this could work, am trying it out
    – sTonystork
    Dec 10, 2018 at 17:09
  • I changed my answer to say One to Many, although in reality it will create a Many to Many relationship if you use the Intersect option and one or more of the people points fall within more than one of the car buffers. However, some of the other join options may create a true One to Many relationship. Dec 10, 2018 at 17:25
  • I'm having difficulty running a calculation in the 'Select by Attributes' dialog. I am not able to input + or - values.
    – sTonystork
    Dec 10, 2018 at 23:08
  • If you are in the Select by Attributes dialog you should be running a query with an SQL expression that is finding a calculated value based on datetime fields. What kind of feature class are you using? A shapefile? A File Geodatabase? SQL Server?, etc. Are your date time values stored in text fields? If so they have to be converted to date time fields. Are you doing this in ArcMap or ArcGIS Pro? If they are datetime fields in a file geodatabase this query should work: ABS(CAR_DATETIME - PEOPLE_DATETIME) <= .00347 Dec 11, 2018 at 0:41
  • Correction: The selection should be ABS(CAR_DATETIME - PEOPLE_DATETIME) <= .0000578703 for a 10 second window (plus or minus 5 seconds). My previous query would have been for a 10 minute window (plus or minus 5 minutes). Dec 11, 2018 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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