chore: improve postal data import observability
Add progress logging and a status script for postal imports and neighbor builds, and ignore local raw and generated postal datasets.
This commit is contained in:
@@ -54,6 +54,21 @@ If you open the app from another machine on your LAN, set `VITE_API_BASE_URL` an
|
||||
3. Import and build adjacency:
|
||||
`npm run seed:postal`
|
||||
|
||||
Notes:
|
||||
- Raw postal source files and generated GeoJSON datasets under `db/rawdata/` and `db/datasets/postal/*.geojson` are ignored by git.
|
||||
- The importer expects WGS84 lon/lat GeoJSON. If a source file is projected, re-export it to `EPSG:4326` before importing.
|
||||
|
||||
Observability commands:
|
||||
- `npm run import:postal` logs progress every 500 features by default.
|
||||
- `npm run build:postal-neighbors` logs per-country progress and final adjacency totals.
|
||||
- `npm run check:postal` prints current postal area and neighbor counts from the database.
|
||||
|
||||
You can change the import log interval with `POSTAL_IMPORT_LOG_EVERY`, for example:
|
||||
`POSTAL_IMPORT_LOG_EVERY=1000 npm run import:postal`
|
||||
|
||||
If you want to validate the current postal tables after an import or neighbor build, run:
|
||||
`npm run check:postal`
|
||||
|
||||
## Google Maps Requirements
|
||||
|
||||
Enable these Google Cloud APIs for the keys you use:
|
||||
|
||||
Reference in New Issue
Block a user