mobilitydb_datagen
MobilityDB random data generator functions
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
mobilitydb | 1.3.0 | GIS | GPL-3.0 | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 1650 | mobilitydb | No | Yes | No | Yes | No | Yes | - |
| 1651 | mobilitydb_datagen | No | No | No | Yes | No | Yes | - |
| Related | mobilitydb mobilitydb postgis timescaledb pgrouting |
|---|
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 1.3.0 | 1817161514 | mobilitydb | mobilitydb |
| DEB | PGDG | 1.3.0 | 1817161514 | postgresql-$v-mobilitydb | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS |
| el8.aarch64 | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS |
| el9.x86_64 | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS |
| el9.aarch64 | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS |
| el10.x86_64 | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS |
| el10.aarch64 | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS | PGDG MISS |
| d12.x86_64 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 |
| d12.aarch64 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 |
| d13.x86_64 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 |
| d13.aarch64 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 |
| u22.x86_64 | PGDG MISS | PGDG 1.2.0 | PGDG 1.2.0 | PGDG 1.2.0 | PGDG 1.2.0 |
| u22.aarch64 | PGDG MISS | PGDG 1.2.0 | PGDG 1.2.0 | PGDG 1.2.0 | PGDG 1.2.0 |
| u24.x86_64 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 |
| u24.aarch64 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 | PGDG 1.3.0 |
Install
You can install mobilitydb directly. First, make sure the PGDG repository is added and enabled:
pig repo add pgdg -u # Add PGDG repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install mobilitydb; # Install for current active PG version
pig ext install -y mobilitydb -v 18 # PG 18
pig ext install -y mobilitydb -v 17 # PG 17
pig ext install -y mobilitydb -v 16 # PG 16
pig ext install -y mobilitydb -v 15 # PG 15
pig ext install -y mobilitydb -v 14 # PG 14
apt install -y postgresql-18-mobilitydb # PG 18
apt install -y postgresql-17-mobilitydb # PG 17
apt install -y postgresql-16-mobilitydb # PG 16
apt install -y postgresql-15-mobilitydb # PG 15
apt install -y postgresql-14-mobilitydb # PG 14
Create Extension:
CREATE EXTENSION mobilitydb_datagen CASCADE; -- requires: mobilitydb
Usage
mobilitydb_datagen: Synthetic mobility data generator for MobilityDB
MobilityDB DataGen provides functions for generating synthetic mobility data for testing and benchmarking MobilityDB workloads. It creates random temporal values including trips, trajectories, and time-varying measurements.
Generating Random Temporal Values
-- Generate a random temporal float over a time span
SELECT random_tfloat(
'2025-06-01 00:00+00', '2025-06-02 00:00+00', -- time span
0.0, 100.0, -- value range
10 -- number of instants
);
-- Generate a random temporal geometric point (trajectory)
SELECT random_tgeompoint(
'2025-06-01 08:00+00', '2025-06-01 18:00+00', -- time span
ST_MakeEnvelope(2.2, 48.8, 2.4, 48.9, 4326), -- spatial bounds
20 -- number of instants
);
Generating Test Datasets
Create bulk test data for benchmarking trip queries:
INSERT INTO trips (vehicle_id, trip, trip_date)
SELECT
i,
random_tgeompoint(
'2025-06-01 08:00+00', '2025-06-01 18:00+00',
ST_MakeEnvelope(2.2, 48.8, 2.5, 48.9, 4326),
50
),
'2025-06-01'
FROM generate_series(1, 1000) AS i;
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.