Splits a UNOCHA global admin boundaries geodatabase into per-country GeoPackage files, one file per country per admin level (ADM0–ADM4).
uv pip install .Requires Python 3.12+.
unocha [OPTIONS] GDB
| Argument / Option | Description |
|---|---|
GDB |
Path to the UNOCHA .gdb geodatabase |
-o, --output-root PATH |
Root directory for output (default: ./data or root_dir from config) |
--compress / --no-compress |
Compress each GeoPackage with zstandard after writing (produces .gpkg.zstd, removes .gpkg); compression is on by default |
--version |
Show version and exit |
--help |
Show help and exit |
# Write uncompressed GeoPackages under ./data/
unocha global_admin_boundaries_matched_latest.gdb
# Write to a specific directory, compressed
unocha global_admin_boundaries_matched_latest.gdb -o /data/unocha -cFor each admin level 0–4, one GeoPackage per country is written to:
<root>/<ISO3>/UNOCHA-<ISO3>-ADM<level>.gpkg[.zstd]
Each file contains these columns:
| Column | Description |
|---|---|
iso3 |
ISO 3166-1 alpha-3 country code |
adm<level>_name |
Admin unit name at the output level |
adm<level>_pcode |
Admin unit P-code at the output level |
dot_name |
Colon-separated name path from ADM0 to the output level, e.g. Afghanistan:Badakhshan |
geometry |
MultiPolygon geometry |
unocha looks for a configuration file in these locations (first found wins):
./unocha_config.yaml./unocha_config.json~/.laser/unocha_config.yaml~/.laser/unocha_config.json
root_dir: /path/to/output # default: ./data
log_dir: /path/to/logs # default: ~/.laser/logsIf no config file is found, defaults are used and a notice is printed.
Each run writes a timestamped log file to the configured log_dir (default ~/.laser/logs/unocha_YYYYMMDD_HHMMSS.log) at DEBUG level. Console output is WARNING and above only.