STEP is an efficient and effective streaming trajectory algorithm.
- STEP can rely only on recent data and a few features to efficiently divide trajectories into meaningful trajectory segments.
- STEP propose a well-designed grid index and three areas to prune unnecessary distance calculations effectively, accelerating the process of trajectory segmentation in streaming environments.
This project mainly includes the following various trajectory segmentation algorithms:
-
The main code for the STEP algorithm is in the org/urbcomp/sts/method/step package.
-
The main code for the SPD algorithm is in the org/urbcomp/sts/method/spd package.
-
The main code for the SWS algorithm is in the org/urbcomp/sts/method/sws package.
For each method there is a corresponding executor, located in the org/urbcomp/sts/executor package.
STEP consists of three modules, Input, Trajectory Segmentation and Stay Point Detection, where Stay Point Detection in turn contains two operations Identifying and Merging.
The purpose of this operation is to detect the streaming stay points of the newly input GPS point, including both the discovery of new stay point and the merging of stay points.
The purpose of this operation is to segment the trajectory according to the segmentation conditions to reduce the stress on the memory from a large number of trajectory points.
The default parameters are set according to the table below and can be adjusted for different data sets.
Parameter | Range | Default |
---|---|---|
D | 10m,20m,50m,75m,100m | 50m |
T | 1min,3min,5min,10min,15min | 15min |
n | 1,3,5,7,10,15,20,25,30 | 20 |
o | 1w,3w,5w,10w | 3w |
window size of SWS | 7 | 7 |
The following resources need to be downloaded and installed:
- Java 8 download: https://www.oracle.com/java/technologies/downloads/#java8
- IntelliJ IDEA download: https://www.jetbrains.com/idea/
- git download:https://git-scm.com/download
- maven download: https://archive.apache.org/dist/maven/maven-3/
Download and install jdk-8, IntelliJ IDEA and git. IntelliJ IDEA's maven project comes with maven, you can also use your own maven environment, just change it in the settings.
-
Open IntelliJ IDEA, find the git column, and select Clone...
-
In the Repository URL interface, Version control selects git
-
URL filling: https://github.com/Spatio-Temporal-Lab/StreamingTrajSegment.git
File -> Project Structure -> Project -> Project SDK -> add SDK
Click JDK to select the address where you want to download jdk-8
Select the org/urbcomp/sts package in the test folder, which includes tests for Latency&Throughput and F1-score.
In order to simulate the streaming of gps points, you can split the data set into multiple files and read them in sequence. For example, write the first GPS point in the data set to the object-1.txt file and put it in the object folder.
Geolife dataset can be found in following linkļ¼datasets CQ-Taxi and CQ-Hazs are not publicly available for the time being, and public data sets such as T-drive can be used instead.