Skip to content

Commit 32c772c

Browse files
committed
Update README for fetched OFMX data
1 parent a038173 commit 32c772c

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ Importer and schema are functional for the LK sample dataset. See `TODO.md` for
99
- `pip install -e .` installs the package and the `psycopg` dependency.
1010
- `config/ofmx2pgsql.example.ini` shows the supported config keys.
1111
- `Dockerfile` builds a container that downloads a snapshot and imports it into PostGIS.
12+
- `scripts/fetch_ofmx.sh` downloads and extracts a snapshot locally for CLI testing.
1213

1314
## Repository Layout
14-
- `ofmx_lk/` sample OFMX data and reference materials.
1515
- `src/ofmx2pgsql/` application package (CLI, parsing, DB loaders).
1616
- `sql/migrations/` PostGIS schema migrations.
1717
- `config/` example configuration files.
@@ -28,12 +28,13 @@ Importer and schema are functional for the LK sample dataset. See `TODO.md` for
2828
## Development Commands
2929
- `python -m unittest discover -s tests` runs the minimal CLI smoke tests in `tests/`.
3030
- `python -m ofmx2pgsql --help` verifies the CLI entry point is wired.
31-
- `python -m ofmx2pgsql scan ofmx_lk/isolated` lists sample `.ofmx` files.
32-
- `python -m ofmx2pgsql scan ofmx_lk/isolated --schema ofmx` prints a schema label before the list.
33-
- `python -m ofmx2pgsql import --dsn \"postgresql://...\" --schema ofmx --ofmx ofmx_lk/isolated/ofmx_lk.ofmx --shapes ofmx_lk/isolated/ofmx_lk_ofmShapeExtension.xml --apply-migrations --verbose` loads the sample dataset.
34-
- `python -m ofmx2pgsql import --dsn \"postgresql://...\" --ofmx ofmx_lk/isolated/ofmx_lk.ofmx --shapes ofmx_lk/isolated/ofmx_lk_ofmShapeExtension.xml --dry-run --verbose` parses without writing to the database.
35-
- `python -m ofmx2pgsql validate --dsn \"postgresql://...\" --schema ofmx --ofmx ofmx_lk/isolated/ofmx_lk.ofmx --shapes ofmx_lk/isolated/ofmx_lk_ofmShapeExtension.xml` compares parsed counts with stored counts.
36-
- `python -m ofmx2pgsql validate --dsn \"postgresql://...\" --ofmx ofmx_lk/isolated/ofmx_lk.ofmx --output-json` emits validation output as JSON.
31+
- `scripts/fetch_ofmx.sh` downloads and extracts the LK snapshot into `data/`.
32+
- `python -m ofmx2pgsql scan data/ofmx_lk/isolated` lists `.ofmx` files.
33+
- `python -m ofmx2pgsql scan data/ofmx_lk/isolated --schema ofmx` prints a schema label before the list.
34+
- `python -m ofmx2pgsql import --dsn \"postgresql://...\" --schema ofmx --ofmx data/ofmx_lk/isolated/ofmx_lk.ofmx --shapes data/ofmx_lk/isolated/ofmx_lk_ofmShapeExtension.xml --apply-migrations --verbose` loads the sample dataset.
35+
- `python -m ofmx2pgsql import --dsn \"postgresql://...\" --ofmx data/ofmx_lk/isolated/ofmx_lk.ofmx --shapes data/ofmx_lk/isolated/ofmx_lk_ofmShapeExtension.xml --dry-run --verbose` parses without writing to the database.
36+
- `python -m ofmx2pgsql validate --dsn \"postgresql://...\" --schema ofmx --ofmx data/ofmx_lk/isolated/ofmx_lk.ofmx --shapes data/ofmx_lk/isolated/ofmx_lk_ofmShapeExtension.xml` compares parsed counts with stored counts.
37+
- `python -m ofmx2pgsql validate --dsn \"postgresql://...\" --ofmx data/ofmx_lk/isolated/ofmx_lk.ofmx --output-json` emits validation output as JSON.
3738
- `python -m ofmx2pgsql import --config config/ofmx2pgsql.example.ini --dry-run --verbose` uses config values with CLI overrides.
3839
- `python -m ofmx2pgsql validate --config config/ofmx2pgsql.example.ini --output-json` uses config defaults with JSON output.
3940

@@ -52,6 +53,6 @@ docker run --rm \
5253

5354

5455
## Data Notes
55-
The sample data in `ofmx_lk/` is treated as reference input. Avoid editing these files unless intentionally updating fixtures.
56+
The LK sample data is fetched on demand into `data/ofmx_lk/` via `scripts/fetch_ofmx.sh` and is ignored by git.
5657

5758
Airspace records in the LK sample reuse `AseUid/@mid`, so `ofmx.airspaces.ofmx_id` is not unique. The schema uses a composite uniqueness constraint on `(ofmx_id, region, code_id, code_type, name)` to preserve distinct entries while keeping imports idempotent.

0 commit comments

Comments
 (0)