Skip to content
Mahmoud SAKR edited this page Oct 9, 2020 · 4 revisions

Managing movement trajectories at scale

GPS became part of our daily life. It is in cars for navigation, and in smart phones helping us finding places, and more recently in avoiding getting infected by COVID-19. Managing and analysing mobility tracks has been the core of my work for the last 12+ years. In this series of blogs, I want to discuss recent research of my group in managing big movement trajectory data.

As a start, let's introduce the main concepts of trajectory data management. The following example shows a bus that goes nearby an advertisement billboard. we wish assess the visibility of the billboard to the passengers in the bus. If one can do this for all billboards and vehicles, then one can extract interesting insights for advertising agencies to price the billboards, and for advertisers to optimize their campaigns.

SmartAds

Here we simply assume that if the bus is within 30 meters to the billboard, then it is visible to its passengers. This is indicated in the animation by the yellow flash around the billboard.

How to express this as a database query ?

Well, first we need a database ! From the location tracking device in the bus, let it be GPS, we get the following sequence of points, each with a timestamp. Input GPS
So let's create a simple PostGIS schema that has two tables as follows:

CREATE TABLE gps( id int, t timestamp, geom geometry(Point, 3812));

CREATE TABLE billboard( id int, geom geometry(Point, 3812));

Belgian Lambert 2008.

CREATE INDEX sidx_gps_geom ON gps USING gist(geom);

Clone this wiki locally