Databases 25 min read

JUST Engine: Novel Spatio‑Temporal Indexes and Data Models for Large‑Scale Urban Data Management

The article introduces the JUST engine, a spatio‑temporal data platform that extends GeoMesa with three new indexes (Z2T, XZ2T, time_range), defines nine common and three specialized data models, provides default indexing strategies, and offers detailed SQL usage guidelines for efficient querying of massive urban datasets.

JD Tech Talk
JD Tech Talk
JD Tech Talk
JUST Engine: Novel Spatio‑Temporal Indexes and Data Models for Large‑Scale Urban Data Management

Problem Background Over 80% of urban data is spatio‑temporal (e.g., gas stations, taxi trajectories, traffic conditions). Traditional spatial databases such as PostGIS struggle with massive datasets, while scalable NoSQL stores like HBase lack native spatio‑temporal support. JUST was built on GeoMesa to address these gaps by adding richer spatio‑temporal types and more efficient indexes.

Spatio‑Temporal Data Urban objects can be classified by geometry (point, line, polygon, network) and by time (instant or interval), yielding 24 combined spatio‑temporal types (8 static, 16 dynamic). Examples include static points (air‑quality stations), dynamic points (GPS traces), static intervals (fuel sales during a time window), and dynamic intervals (traffic flow during rush hour).

Spatio‑Temporal Indexes JUST supports four GeoMesa indexes (Z2, Z3, XZ2, XZ3) and introduces three new ones:

Z2T: combines Z2 spatial indexing with time‑partitioning to reduce unnecessary scans for point data.

XZ2T: analogous to Z2T but for non‑point geometries.

time_range: a one‑dimensional index for interval queries.

Additional non‑spatial indexes include id (primary‑key) and attr (attribute) indexes, the latter supporting secondary spatio‑temporal indexes (e.g., attr+z3 ).

Data Models JUST provides nine common spatio‑temporal plugins (e.g., SSPoint, SDLine) and three specialized plugins (Trajectory, RoadNetwork, RouteOfTrajectory). Each plugin defines default indexes; for instance, SSPoint uses z2,z2t,attr(attr+z3),id . Users can extend models with custom meta fields and optional reading fields.

Plugin Types

Static Spatial (SS) plugins: point, line, region with optional meta data.

Dynamic Spatial (DD) plugins: point, line, region with time stamps and optional reading data.

Static‑Dynamic (SD) plugins: combine static meta with time‑varying readings.

Specialized business plugins: Trajectory, RoadNetwork, RouteOfTrajectory, each with domain‑specific meta fields.

Usage Guide JUST offers a SQL engine for table creation and index configuration. Examples:

create table point(pPoint) ;
create table non_point_time(poly Polygon, time Date) ;
create table non_point_index(poly polygon, time Date) userdata {"geomesa.indices.enabled":"xz2t"} ;
create table date_table(ts Date:index=true) ;
create table st_time_range_table(p Point, ts Date, te Date) userdata {"geomesa.indices.enabled":"z3", "geomesa.xz3.timerange.key":"time_range", "geomesa.xz3.timerange.start":"ts", "geomesa.xz3.timerange.end":"te"} ;

Indexes can be customized via the userdata clause, specifying which GeoMesa indexes to enable and configuring secondary index parameters for time intervals.

Query Examples

Time range query: select * from date_table where time >= to_timestamp('2020-11-12 00:00:00') and time <= to_timestamp('2020-11-13 00:00:00');

Spatial range query: select * from point where pwithin st_makeBBox(110.0,30.0,110.7,30.8);

Spatio‑temporal range query: select * from non_point_time where polywithin st_makeBBox(110.0,30.0,110.7,30.8) and time >= to_timestamp('2020-11-12 00:00:00') and time <= to_timestamp('2020-11-13 00:00:00');

Time‑interval query: select * from time_range_table where time_range between to_timestamp('2020-11-12 00:00:00') and to_timestamp('2020-11-13 00:00:00');

Combined spatial‑temporal interval query using ECQL: st_ecql("bbox(p,110.0,30.0,110.7,30.8) and time_range during2020-11-12T00:00:00/2020-11-13T00:00:00", time_range_table, local);

Attribute query with spatial and temporal filters: select * from attr_st_table where a='xxx' and geo within st_makeBBox(110.0,30.0,110.7,30.8) and time >= to_timestamp('2020-11-12 00:00:00') and time <= to_timestamp('2020-11-13 00:00:00');

The JUST engine has been published at the ICDE conference and deployed in several Chinese cities, offering a comprehensive solution for managing and querying massive spatio‑temporal datasets.

big dataSQLdatabasesDistributed DatabasesGeoMesaJUST enginespatio-temporal indexing
JD Tech Talk
Written by

JD Tech Talk

Official JD Tech public account delivering best practices and technology innovation.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.