Select to view content in your preferred language

GeoAnalytics Workflow for analysing truck GPS tracking data

1159
4
Jump to solution
10-18-2022 06:39 AM
TroyKechely
Emerging Contributor

I'm new to using GeoAnalytics and trying to find the best workflow for a couple of projects we have.  They involve massive GPS data files for trucks leaving the same starting point and going out to different locations and then returning. We need to be able to isolate and then analyze the routes to each destination and back and look for where the trucks spend the most time waiting, how much time they spent there, and overall efficiency for each trucks trip.  I know the GeoAnalytics can do this but hoping someone can help me with the best workflow and tools to accomplish this.  The end goal of the analysis will be charts that we can show the clients in reports so whatever I do needs to be towards that end goal.  Thanks.

1 Solution

Accepted Solutions
cxu
by
New Contributor

Thank you for the post! There are a few things that may change your analysis options:

  1. How many destination locations there are.
  2. If trucks spend a certain amount of time at each destination.

Given that, here are some ideas to start with:

1. To find the individual trips for each truck, we’ll use two tools:

  1.     Split the tracks by “dwells”, which is when a truck doesn’t move very far over a certain amount of time. Assuming your GPS data files are points with date/time, location, truck id, and speed. Use Find Dwell Locations tool (https://pro.arcgis.com/en/pro-app/latest/tool-reference/big-data-analytics/find-dwell-locations.htm) to identify tracks. The input layer is the GPS point layer, and Track Fields is the truck ID. Distance Tolerance and Time Tolerance are determined by you. For example, if you think that a truck stays within 30 meters for 30 minutes between each trip, those are the parameters to use. You can start with a small dataset (e.g., one truck’s GPS records that cover a whole trip in one or two days), visualize the points, and get an idea how to define the distance and time tolerance. The output of this tool will create a point layer, with a new column to identify the GPS points that are “dwelling”.

    b. Identify individual truck segments now that you know where they have “dwelled”. Use Detect Incidents and use an Arcade expression that will identify when a track has a different dwell ID than previously. To do this, the parameter track_fields should be the dwell id, and do a calculation like:

              start_condition : var dwell = TrackFieldWindow("dwelled”, -1, 1); return dwell[0] != dwell[1]

              end_condition : var dwell = TrackFieldWindow("dwelled”, 0, 2); return dwell[0] != dwell[1]

2. Then reconstruct the tracks for each trip, using the new ID column calculated in the Detect Incidents tool. This will help to visualize the travel path of the trucks. You’ll end up with some tracks of the “dwell locations”, you could optionally only analyze inputs where dwell id is null. This result will all show the duration of each trip. If you want to calculate wait times or where trucks are getting stuck (including or excluding the destination) run find dwell location and output the dwells as convex hulls. You will get polygons of locations, which you could analyze using a non-GeoAnalytics tool like hot spot analysis or count overlapping features (https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/count-overlapping-features.htm).

3. One solution for identify track destinations is by creating polygons or points for each known destination. Then, join each reconstruct track (line) to the point dataset to identify this location it intersects or is near to. You’ll use a spatial relationship as the join type (Intersect or Near).

Hope this helps! The workflow may change depending on the GeoAnalytics products (e.g., Server, Pro, or Engine) that you are using. Please feel free to reach out again if you have further questions with this issue or a certain product/tool.

View solution in original post

4 Replies
cxu
by
New Contributor

Thank you for the post! There are a few things that may change your analysis options:

  1. How many destination locations there are.
  2. If trucks spend a certain amount of time at each destination.

Given that, here are some ideas to start with:

1. To find the individual trips for each truck, we’ll use two tools:

  1.     Split the tracks by “dwells”, which is when a truck doesn’t move very far over a certain amount of time. Assuming your GPS data files are points with date/time, location, truck id, and speed. Use Find Dwell Locations tool (https://pro.arcgis.com/en/pro-app/latest/tool-reference/big-data-analytics/find-dwell-locations.htm) to identify tracks. The input layer is the GPS point layer, and Track Fields is the truck ID. Distance Tolerance and Time Tolerance are determined by you. For example, if you think that a truck stays within 30 meters for 30 minutes between each trip, those are the parameters to use. You can start with a small dataset (e.g., one truck’s GPS records that cover a whole trip in one or two days), visualize the points, and get an idea how to define the distance and time tolerance. The output of this tool will create a point layer, with a new column to identify the GPS points that are “dwelling”.

    b. Identify individual truck segments now that you know where they have “dwelled”. Use Detect Incidents and use an Arcade expression that will identify when a track has a different dwell ID than previously. To do this, the parameter track_fields should be the dwell id, and do a calculation like:

              start_condition : var dwell = TrackFieldWindow("dwelled”, -1, 1); return dwell[0] != dwell[1]

              end_condition : var dwell = TrackFieldWindow("dwelled”, 0, 2); return dwell[0] != dwell[1]

2. Then reconstruct the tracks for each trip, using the new ID column calculated in the Detect Incidents tool. This will help to visualize the travel path of the trucks. You’ll end up with some tracks of the “dwell locations”, you could optionally only analyze inputs where dwell id is null. This result will all show the duration of each trip. If you want to calculate wait times or where trucks are getting stuck (including or excluding the destination) run find dwell location and output the dwells as convex hulls. You will get polygons of locations, which you could analyze using a non-GeoAnalytics tool like hot spot analysis or count overlapping features (https://pro.arcgis.com/en/pro-app/latest/tool-reference/analysis/count-overlapping-features.htm).

3. One solution for identify track destinations is by creating polygons or points for each known destination. Then, join each reconstruct track (line) to the point dataset to identify this location it intersects or is near to. You’ll use a spatial relationship as the join type (Intersect or Near).

Hope this helps! The workflow may change depending on the GeoAnalytics products (e.g., Server, Pro, or Engine) that you are using. Please feel free to reach out again if you have further questions with this issue or a certain product/tool.

TroyKechely
Emerging Contributor

 

Thank you so much! This is the guidance I was hoping for and as always the ESRI team came through for me.  

0 Kudos
cxu
by
New Contributor

Thank you! Please just let us know if you have any questions. 

In 1(b), when use Detect Incidents tool to assign unique id for each track segment,  the first few points in a time series may not be labeled. To fix it, please do a calculation like:

              start_condition : var dwell = TrackFieldWindow("dwelled”, -1, 1);

                                            return dwell[0] != dwell[1]  || TrackStartTime() == TrackCurrentTime();

 

 

0 Kudos
TroyKechely
Emerging Contributor

I was able to use the dwell tool to identify routes (I think) but the detect incident section in part 1B of your answer is not working. When I entered in the code as you provided it gives an error stating the code is incorrect. When I replace “dwelled” with the DwellID field it runs but the resulting layer does not have anything in the incident field.  What am I doing wrong?

Also, there are many times on a route where the trucks are stuck waiting, such as at a ferry, that are triggering a dwell event. Is there a better way to filter those out to combine a route or just play around with the distance and time constraints?  

0 Kudos