1.0 KiB
1.0 KiB
Data loading
The scripts in this directory are used to extract, transform and load (ETL) the core datasets for Colouring London:
- Building geometries, sourced from Ordnance Survey MasterMap (Topography Layer)
- Unique Property Reference Numbers (UPRNs), sourced from Ordnance Survey AddressBase
Prerequisites
Before running any of these scripts, you will need the OS data for your area of interest. AddressBase and MasterMap are available directly from Ordnance Survey.
To help test the Colouring London app, get_test_polygons.py
will attempt to save a small
(1.5km²) extract from OpenStreetMap to a format suitable for loading to the database.
The scripts should be run in the following order:
- extract_addressbase.sh
- extract_mastermap.sh
- filter_transform_mastermap_for_loading.sh
- load_geometries.sh
- create_building_records.sh
- (SQL migration) psql < ../migrations/002.index-geometries.sql
- load_uprns.py
- (SQL migration) psql < ../migrations/002.index-buildings.sql