Trajectory splitting by transport type
Identify the mean of transport from a set of coordinates might give important information towards a better trajectory analysis. Consider…
Trajectory splitting by transport type
Identify the mean of transport from a set of coordinates might give important information towards a better trajectory analysis. Consider data gathered by a smartphone where several transport means are used during a journey to work. In case you are interested in the driver profile, it is important to split the trajectory in sub trajectories to exclude walks or even more complex transport types like train and metro.
A possible solution for trajectory splitting considering mean of transport is classification algorithm. The principle is that you can identify the mean of transport evaluating information like max speed, avg speed, acceleration and deceleration. The classification algorithm receives a set of already classified data and performs a training over a percentage of this data. The result is a decision tree which looks like the Figure 1.

Figure 1 — Transport mean decision tree generated from Geolife database
The decision tree is capable to classify new instances of coordinates which has never been “seen” by the algorithm. In order to generate the decision tree of Figure 1, I have pre-processed Geolife database in order prepare a ARFF file (Weka file format) with speed and acceleration by mean of transport. Then J48 classifier was executed with 55% of the dataset for training . This configuration results in 85.19% of correct classification over the dataset. The main reason of incorrect classification was a confusion between train and metro which is quite acceptable.
Although decision tree is a powerful tool it is not enough to identify the mean of transport without a smarter algorithm. For example, many people walks at 5 or 8 km/h and such speed is achieved by car before stopping on semaphores or crossings. Considering this, it is important to define a threshold which triggers an mean of transport change.
To distinguish walk from motorized movements, I’ve applied the following parameters into a algorithm which a split trajectory based on the transport type:
- Walking threshold: 10
- Motorized threshold: 3
- Walking speed limit: 10 km/h (and avg speed under 5 km/h)
Parameters above might be changed accordingly to every case. In my samples, it was possible to distinguish semaphores and crossing from walk.
Results indicate that this approach is capable to easily separate walks from heavy traffic periods. The method will not fit perfectly on every situation unless more effort is added to it. In my case, this simple approach allow to get great results.
The Figure 2 shows a case where point A is a heavy traffic while point B is a parking place where the driver left his car. Changing the parameters to consider higher speeds on walking will break the trajectory in point A and B.

Figure 2 — Heavy traffic and walking on the same trajectory
However, the specified parameters allow to split the trajectory only on point B as shown on Figure 3.

Figure 3 — The final trajectory without walk sub trajectory
The main advantage is keep the motorized trajectory intact which helps to understand driver profile. In this particular case, two traffic violations were found from point A to B which changes the aggressive index of the trajectory as a whole.
It is possible to improve results considering acceleration, outliers and also GPS accuracy.In case my dataset require it, I’ll improve the current method e post more results.
Posted 20th June 2016 at thechaoscomputing.blogspot.com.
메타데이터
- post_id
- 2b19f3e2be65
- slug
- trajectory-splitting-by-transport-type-2b19f3e2be65
- url
- https://medium.com/@marciogj/trajectory-splitting-by-transport-type-2b19f3e2be65
- canonical_url
- https://medium.com/@marciogj/trajectory-splitting-by-transport-type-2b19f3e2be65
- author_url
- https://medium.com/@marciogj
- status
- ok
- fetched_at
- 2026-07-30 12:04:41