Loads buildings and roads from GeoJSON, builds a road hierarchy, and assigns metric house numbers.
python -m house_address_generator.cli --helppip install house-address-generatorIf you’re working from source:
pip install -e .Generate addresses from existing GeoJSON files:
python -m house_address_generator.cli generate data/input/roads.geojson data/input/buildings.geojson \
--coordinate-system 32645 \
--viz \
--num-random 8 \
--viz-output data/output/addresses_visualization.png \
-o data/output/addresses.geojsonRun a full OSM workflow (downloads data; this can take a while and needs network access):
python -m house_address_generator.cli workflow \
--source osm \
--place "Pokhara, Nepal" \
--osm-cache-dir data/osm_cache \
--output-dir data/output/pokhara \
--prefix pokhara \
--vizValidate output against the reference API dump:
python -m house_address_generator.cli validate \
-r data/validation/api_reference_buildings.json \
-g data/output/addresses.geojson \
-o data/output/validation.jsonOSM workflow scripts:
scripts/generate_pokhara_osm.sh– Downloads Pokhara data from OSM, generates addresses, saves a visualization.
Both scripts expect the repo root as the working directory and will exit on failure.
- Input GeoJSON:
data/input/ - Outputs and visualizations:
data/output/<dataset>/ - OSM cache:
data/osm_cache/ - Validation assets:
data/validation/ - Fixtures are compressed:
data/input/roads.geojson.gzanddata/input/buildings.geojson.gz
pip install -e ".[dev]"
make lint
make type
make testLonger algorithm notes live in docs/ALGORITHM_DOCUMENTATION.md.
Open an issue or a PR. Keep changes focused and include a minimal repro or command output when possible.