Select to view content in your preferred language

Amount of Time Within a Polygon from Tracks?

1222
13
09-20-2022 10:46 AM
ArmstKP
Frequent Contributor

I am looking to discern when snow plows are plowing parking lots.  Our plows don't have a plow up/down sensor, so I have to use some logic.  Is it possible to use the "Find Dwell Locations" of my tracks and determine this?  Anybody have any other suggestions?

0 Kudos
13 Replies
PeterNasuti
Esri Contributor

@ArmstKP Thanks for reaching out and asking your question! There are many different ways this could be approached and your analytics could be designed using ArcGIS Velocity. Much of this depends on your goals and desired outputs/outcomes:

  • Do you want to trigger an alert/notification when a plow is plowing a parking lot? (Filter by Geometry tool to notification outputs)
  • Do you want to enrich breadcrumb observations with whether or not a parking lot is being plowed, or also enrich with the parking lot ID associated with each breadcrumb (Join Features tool)
  • Do you want to identify the start and end times, know the event duration, create an event identifier of each "parking lot plowing event"? (Detect Incidents tool)
  • Do you want to know each time a snow plow "dwells" within a certain boundary, likely plowing a parking lot? (Find Dwell Features tool with distance/timespan tolerance)

You can do all of the above, or any combination of the above when building up your analytics. Feel free to provide additional details about your desired outcome/output goals.

0 Kudos
ArmstKP
Frequent Contributor

@PeterNasuti  Thanks Peter!

I am trying to accomplish your last bullet point.  I want to know when a snow plow is within or very near a parking lot polygon, then create a convex hull from the VehicleTracks using the Find Dwell Feature Tool, then if that intersects with the parking lot polygon, I will then take the timestamp of when it was processed and calculate the lastserviced field with that date.  I have tested this and my model never outputs any records, even though if I look at my tracks it should trigger an output:

ArmstKP_1-1663699715031.png

 

 

PeterNasuti
Esri Contributor

@ArmstKP Thanks for the additional info!

Looking at the metrics of your analytic, "Find Dwell Features" has 0 records, so we can identify this tool as the "blocker" to explain why your model has no outputs. This tool more than likely has no outputs because of your properties "distance tolerance: 500 feet" and "time span tolerance: 15 minutes". When a plow truck is moving around plowing a parking lot, it is still in motion and getting bread crumb updates at distance and time span greater than the tolerances specified. Therefore, none of your AVL track points satisfy a "dwell" per this criteria, so this tool has no output. You could adjust the distance/time tolerance to better identify parking lot plowing speed as a dwell, but this could capture many other events when the plow truck is merely driving slow or plowing elsewhere. Rather than diving into analytic design for that tool configuration, lets consider a few things.

From your description, it sounds like the fundamental goal is to update the parking lot polygons with their lastserviced field with the last date of service. In this reply, I am moving forward with that assumption, but if that assumption is wrong please correct me. This is a common AVL/geospatial scenario that has been addressed by various implementations of the below logic to identify/recognize vehicle visits to certain locations.

Consider the following design approach as an option:

  1. Sources
    1. Parking lot polygons
    2. Vehicle tracks
    3. Events (Assuming this is winter storm events)
  2. Outputs
    1. Parking lots (updated with lastserviced date)
  3. Tools:
    1. Keep your Join Features-1 to enrich Vehicle Tracks with event information
    2. Add "Detect Incidents" tool as the next tool after Join Features-1
      1. Pipeline:
        1. Target: output of Join Features-1
        2. Join: Parking lot polygons
      2. Configuration:
        1. Open condition: spatial relationship: intersects
        2. Accept other defaults
      3. Why use this tool?
        1. Create unique sets of observations for each detected incident (plow truck in parking lot polygon)
        2. Filter your AVL dataset down to events where plow trucks are working on parking lot polygons
    3. Add "Reconstruct Tracks" tool as the next tool after Detect Incidents
      1. Pipeline:
        1. Target: output of Detect Incidents
      2. Configuration:
        1. Summary Fields:
          1. Your datetime field, statistic of MAX, we will call this "datetimefield_MAX"
          2. IncidentDuration field, statistic of MAX
        2. Accept other defaults
      3. Why use this tool?
        1.  Take your set of AVL/breadcrumb points and convert them to a polyline representing plow truck travel within the parking lot plowing event. Also acquires the duration of the dwell event in milliseconds.
    4. Add "Filter by Expression" tool as the next tool after "Reconstruct Tracks"
      1. Pipeline:
        1. Target: output of Reconstruct Tracks
      2. Configuration
        1. Filter down any polylines less than "x" milliseconds of duration 
        2. Filter on DwellDuration_MAX field
      3. Why use this tool?
        1. Filter out the cases where a plow truck drove into a parking lot briefly but didn't actually spend enough time to plow the location
    5. Add "Join Features-2" tool as the next tool after "Filter by Expression"
      1. Pipeline:
        1. Target: output of Filter by Expression
        2. Join: Parking lot polygons
      2. Configuration
        1. Spatial: intersects
        2. Summary fields:
          1. Parking lot name/identifier, ANY
      3. Why use this tool?
        1. Append the associated parking lot name with the reconstructed AVL track plowing that parking lot to the schema
    6. Add "Summarize Attributes" tool as the next tool after "Join Features"
      1. Pipeline:
        1. Target: output of "Join Features-2"
      2. Configuration:
        1. Field: the Parking lot name/identifier, ANY that was generated in prior Join Features tool
        2. Summary field:
          1. Datetimefield MAX
        3. Why use this tool?
          1. For each unique parking lot processed by the former tools, calculate the most recent datetimefield value to get the most recent plow visit
    7. Add "Join Features-3" tool as the next tool after "Summarize Attributes"
      1. Pipeline:
        1. Target: Parking lot polygons
        2. Join: Output of Summarize Attributes tool above
      2. Configuration:
        1. Attribute join between parking lot name/identifier fields
        2. Summary field: datetimefield value ANY to append the latest edit value
      3. Why use this tool?
        1. Append the latest datetimefield value to the schema of the parking lot polygons
    8. Add "Map Fields" tool as the next tool after "Join Features"
      1. Pipeline:
        1. Target: Join Features-3 tool output from above
      2. Configuration:
        1. Replace your original datetimefield value in Arcade expression with the value from this new field
        2. Delete this new/surplus datetimefield value once the value is utilized
      3. Why use this tool?
        1. Update the parking lot polygon modified datetime value

There are many ways to design and configure analytics in ArcGIS Velocity, and I have provided the above as an example that has led to success for other users for similar use cases.

ArmstKP
Frequent Contributor

@PeterNasuti Thanks a million for the detailed steps.  One question, though?  In step 3.3.2.1.2, do you mean the IncidentDuration field, not the DwellDuration field? 

0 Kudos
PeterNasuti
Esri Contributor

@ArmstKP Yes my mistake! Thanks for catching that - I will edit my above post for the future reference of others as well.

ArmstKP
Frequent Contributor

@PeterNasuti I think I got is setup correctly, but still no output?  

ArmstKP_0-1663772311587.png

 

0 Kudos
PeterNasuti
Esri Contributor

@ArmstKP The metrics show 0 features passed Detect Incidents - this would require additional information to investigate:

  1. What are all the specified parameters of the Detect Incidents tool
  2. Send output to feature layers for inspection
    1. Send "Join Features-1" to a new feature layer (Add new features, replace existing features)
    2. Send "Parking lots" to a new feature layer (Add new features, replace existing features)
    3. Add both these feature layers to a web map
    4. Inspect to ensure that vehicle AVL points overlap/intersect
  3. Check spatial reference of target and join pipeline nodes going into this tool to ensure that they match

If the above does not lead to findings to resolve this, you may be better served by opening a support ticket with Esri Support Services to have a call/screenshare for further investigation.

JeffSilberberg
Frequent Contributor

 

A little off topic, but what device are you using in your plow trucks that you can not get a Telemetry point from for Up/Down ?  

 

ArmstKP
Frequent Contributor

@JeffSilberberg We currently aren't using any up/down sensors.  We are testing and looking into them right now, but there are many issues with them.  We are using speed, location and vehicle type to determine if a route has been plowed.  We plow park trails, so we do not get a lot of vehicles traversing segments other than when they are plowing, so it makes it easier.....

0 Kudos