Skip to main content
Solved

Driver GPS Point Start Stop Sequence

  • September 12, 2019
  • 8 replies
  • 36 views

Forum|alt.badge.img+1

I am looking to take a point feature class that acquires a GPS location from our Utility trucks every 15 seconds and create routes driven based upon historical data. End goal is I would like to build a polyline feature class to reduce the amount of data that I am publishing to our Portal to improve the performance of querying data, as we are acquiring approximately 2.5-3 million points within a 30 day span.

Below is an example of the data being received.

Here is what the data means:

Vehicle is Offline = IsIdle - 0 & GpsActive - 0

Vehicle is active but in a Idle State = IsIdle - 1 & GpsActive - 1

Vehicle is Actively Moving = IsIdle - 0 & GpsActive - 1

The part I am getting stumped on is how I can define routes driven. In the example above, there would have been 2 routes driven. The first route would be from

to

 

and the second route being

to

Below is an example of where I would like to take the data, with the addition of some sort of RouteID field.

Any help is greatly appreciated.

Dave

Best answer by ebygomm

You should be able to use adjacent attribute handling to set the route id. I'm presuming you would just need to start at 1 and then increment that number every time the gpsactive field changes to 0?

 

gpsroute.fmwt

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • September 12, 2019

Could you share a sample CSV file, so we can have a try at this fun challenge?


Forum|alt.badge.img+1
  • Author
  • September 12, 2019

Could you share a sample CSV file, so we can have a try at this fun challenge?

Vehicle Historical Routing.csv

Here's a small sample set.


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • September 12, 2019

You should be able to use adjacent attribute handling to set the route id. I'm presuming you would just need to start at 1 and then increment that number every time the gpsactive field changes to 0?

 

gpsroute.fmwt


erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • September 12, 2019

I have created a FME workspace (FME 2019) that creates the 13 lines from the sample.

The workspace looks like this:

 

This is the output (in the Data Inspector):

The workspace is attached here route.fmw

Hope this helps.


Forum|alt.badge.img+1
  • Author
  • September 12, 2019

You should be able to use adjacent attribute handling to set the route id. I'm presuming you would just need to start at 1 and then increment that number every time the gpsactive field changes to 0?

 

gpsroute.fmwt

Solid response and that was way easier than I was anticipating.


Forum|alt.badge.img+1
  • Author
  • September 12, 2019

You should be able to use adjacent attribute handling to set the route id. I'm presuming you would just need to start at 1 and then increment that number every time the gpsactive field changes to 0?

 

gpsroute.fmwt

This seems to work great. The only issue I am seeing now is that for each vehicle, which I have around 100 total. Not all vehicle RouteID's start at 1.

Forum|alt.badge.img+1
  • Author
  • September 13, 2019

You should be able to use adjacent attribute handling to set the route id. I'm presuming you would just need to start at 1 and then increment that number every time the gpsactive field changes to 0?

 

gpsroute.fmwt

@egomm Do you know how I can get the start and stop sequence to start at 1 for each vehicle based off of the field "VehicleID"? I've attached a larger list for you to view.

 

Vehicle Export.csv


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • September 13, 2019

@egomm Do you know how I can get the start and stop sequence to start at 1 for each vehicle based off of the field "VehicleID"? I've attached a larger list for you to view.

 

Vehicle Export.csv

You can add an extra condition in the attributecreator that will set the routeID back to 1 for each vehicle, you'll need to ensure that the the data is sorted by vehicle first, then gpstime for this to work correctly