All Products
Search
Document Center

ApsaraDB RDS:Trajectory introduction

Last Updated:Mar 28, 2026

GPS and other location sensors continuously generate time-stamped coordinates — vehicle routes, delivery paths, equipment inspection tracks. Storing these as raw point records makes spatial analysis slow and storage-intensive. ApsaraDB RDS for PostgreSQL provides native trajectory support through the GanosBase spatio-temporal engine, which lets you:

  • Compress trajectory points to reduce storage costs

  • Calculate intersections between trajectories

  • Extract sub-trajectories from a longer path

  • Determine the similarity between trajectories

How it works

A trajectory is built from individual trajectory points. Each point records a timestamp and spatial coordinates. For example, an object at longitude 114.35, latitude 39.28 at 17:42:30 on April 11, 2020 produces the following record:

Timexy
2020-04-11 17:42:30114.3539.28

Sampling points often include additional attributes such as speed and direction. Adding a speed attribute to the example gives:

TimexySpeed
2020-04-11 17:42:30114.3539.284.3

As the object moves, more trajectory points are collected. Three consecutive points form a sequence like this:

TimexySpeed
2020-04-11 17:42:30114.3539.284.3
2020-04-11 17:43:30114.3639.284.8
2020-04-11 17:44:30114.3539.293.5

Aggregating these points produces a spatio-temporal trajectory, as shown in the following figure.

Spatio-temporal trajectory

Use cases

  • Vehicle tracking: Record GPS coordinates and speed for a fleet of vehicles. Query routes or detect overlapping paths.

  • Logistics and delivery: Store courier paths and extract sub-trajectories to audit on-time performance for specific route segments.

  • Equipment inspection: Capture inspection device tracks across a facility and calculate trajectory similarity to verify that inspection routes match required coverage patterns.