JUST-Traj: A Distributed and Holistic Trajectory Data Management System




Web Poral


  1. We prepare a test account for the reviewers. UserName: JustTestUser, Password:JustTestUser!1
  2. Enter the login page: http://portal-just.urban-computing.cn/login
  3. Enter the User Name (JustTestUser) and Password (JustTestUser!1), then click the button Login, as shown in the following picture.


Figure 1: Login.

Web Poral

As shown in Figure 2, the web portal of JUST-Traj has three panels: (1) table panel, which manages the created tables; (2) SQL panel, which provides an SQL editor; and (3) result panel, which visualizes the result by multiple display forms, i.e., table view, chart view (i.e., histogram and line chart), and map view.


Figure 2: Web portal.

Create Table

JUST-Traj uses the following statement to create a trajectory table: CREATE TABLE <table name> (<field name > Trajectory), where field name is the field name of the trajectory in the database. For example,

Load Data

We can load data from multiple sources into JUST-Traj using the following statement: LOAD <source type>:<file path> TO JUST:<table name> CONFIG {<the field mapping relationship>}; where source type could be HDFS, HIVE, KAFAK, FLINK, and the CONFIG provides the field mapping between the source and the JUST-Traj table.

For example, we load data from HDFS to JUST-Traj.

where `/trajectories' is the path of trajectories, lines from 2 to 4 are the field mappings.


JUST-Traj provides spatial or spatio-temporal queries: e.g., spatial range query, spatio-temporal range query, ID temporal query, kNN query.

(1) Spatial query: SELECT * FROM traj_table WHERE (traj, st_makeBBox(lng1,lat1, lng2, lat2); where, spatial relationship could be st_within, st_intersect, st_overlap. st_makeBBox is a spatial range formed by two points (lng1,lat1) and (lng2,lat2).

For example,

(2) Spatio-temporal query

(3) ID-temporal query

(4) Similarity Query

(5) K-NN query


JUST-Traj supports many out-of-the-box analyses on trajectories, which facilitates the development of applications. The SQL statement of DAL is as follows: SELECT <analysis operation>(traj, {<parameters>}) FROM <table name>; where, analysis operation is the name of analysis on trajectories, parameters set the corresponding parameters. Five common analyses provided by JUST-Traj, i.e.,

Processing. Although we can pre-process before storing, the parameter of each algorithm could be adjusted when analyzing. Thus, JUST-Traj also supports the processing in the analytics stage;

(1) Noise Filtering

(2) Segmentation

(3) Interpolation

(4) MapMatching

create a trajectory table for MapMatching

Load Data

create a road network table

Load Data




Aggregation. JUST-Traj provides many aggregation operations, e.g., max(), min(), count(); For example,

Stay Point Detection. Moving objects tend to stay due to certain events, such as vehicles staying for refueling, couriers staying for delivery. By analyzing the place that a mobile object stays, we can infer to some places of interesting, e.g., the delivery address;

Holistic Solutions

Spatio-temporal Query and Stay Point Detection In this scenario, we detect stay points from the spatio-temporal query result. We define the location where the lorry stays over a given time threshold (minStayTimeInSecond) as a stay point, where the location is a spatial region whose maximum distance not greater than a distance threshold (maxStayDisInMeter). The underlying locations of stay points could be the delivery addresses. The SQL is as follows:

Lines from 7 to 10 take a spatio-temporal range to query trajectories from the database. Lines from 1 to 3 execute the Stay Point Detection operation on the extracted trajectories, where lines from 2 to 3 are parameters of Stay Point Detection.

ID Temporal Query and Noise Filtering

In this scenario, we define the point whose speed exceeds the maximum limited speed (maxSpeedMeterPerSecond) as the noise point, and we filter that point. The SQL is as follows:

LOADING trajectories of Guiyang:

The raw trajectory


Figure 3: The raw trajectory of '1192408782'.

Noise Filtering

Lines from 7 to 9 take a ID Temporal query to extract trajectories from the database. Lines from 1 to 3 execute the Noise Filtering operation on the extracted trajectories.


Figure 3: Cleaned Trajectories of '1192408782'.


Download Back Results





Download DB-Driver

The DB Driver is a Java-based API for accessing JUST-Traj DB. It complies with the JDBC specification, implements most of the interfaces, and extends some space-time attributes. Users can download the just-drive-java.jar from http://nexus.cbpmgt.com/nexus/#nexus-search;quick~just-driver-java.


Quick Start

Because the API follow the JDBC specification, so we can according to the JDBC API to access DB. The official document of JDBC: https://docs.oracle.com/javase/tutorial/jdbc/basics/index.html.



Here's a demo to use DB-Driver

For trajectory

Create table

Load Data


where "sql" is the query statement provided by JUST-Traj. e.g., for spatial query

other queries can refer to the statements described in Web portal.