Skip to content
LocusQ

One PostGIS schema for the whole platform

Schema v2 holds nine feature-family tables in the locusq namespace, for any country, any admin depth and any language. DataLab writes it; pg2osm and DataGen read it.

Data

2.3.0Free

01What it does

Apply it with one script

apply.sh applies each migration once and records it in public.locusq_schema_migrations, so it is safe to re-run. A checksum mismatch stops it with exit code 3.

bash
scripts/apply.sh "$DSN"        # normal command = v2: V002 and later (v2 schema + hardening), each applied once (re-runnable)
scripts/verify_v2.sh "$DSN"    # verify v2 (exit 0 + PASS line)

A vocabulary that versions on its own

vocabulary.yaml is the tag contract that pg2osm turns into OSM tags. Adding terms is a minor version and needs no DDL change. Vocabulary 2.3.0 adds the kind other, the fallback for unmapped values.

Rules for a platform contract

Released migrations are never edited; a new one is added. A breaking DDL change means a major version. tests/run.sh runs the full v2 suite against its own PostGIS container.

bash
tests/run.sh                   # the full v2 test suite (starts its own PostGIS container)

02Install

Run Schema yourself

  1. Get access

    The repositories and packages are private while LocusQ is in private release. Ask for access and say which tools you need.

  2. Apply the schema to your database

    Use 127.0.0.1 and ?sslmode=disable: psql 18 cannot negotiate with a PostGIS 17 server otherwise, and localhost resolves to ::1 and fails.

    bash
    DSN="postgresql://user:pass@127.0.0.1:5432/yourdb?sslmode=disable"
    scripts/apply.sh "$DSN"
    scripts/verify_v2.sh "$DSN"

Shape your data once

The guide covers applying, verifying and the migration rules.