Use self-hosted tiles
This commit is contained in:
parent
1cee9c38ce
commit
69de6d75af
6 changed files with 342 additions and 21 deletions
|
|
@ -2,6 +2,7 @@ version: '3'
|
|||
|
||||
vars:
|
||||
DATA_DIR: /bulk/property-data
|
||||
TILES_OUTPUT: "{{.DATA_DIR}}/uk.pmtiles"
|
||||
ARCGIS_OUTPUT: "{{.DATA_DIR}}/arcgis_data.parquet"
|
||||
PRICE_PAID_OUTPUT: "{{.DATA_DIR}}/price-paid-complete.parquet"
|
||||
IOD_OUTPUT: "{{.DATA_DIR}}/IoD2025_Scores.parquet"
|
||||
|
|
@ -21,8 +22,31 @@ vars:
|
|||
NAPTAN_OUTPUT: "{{.DATA_DIR}}/naptan.parquet"
|
||||
BROADBAND_OUTPUT: "{{.DATA_DIR}}/broadband.parquet"
|
||||
SCHOOL_PROXIMITY_OUTPUT: "{{.DATA_DIR}}/school_proximity.parquet"
|
||||
POSTCODES_OUTPUT: "{{.DATA_DIR}}/postcodes"
|
||||
|
||||
tasks:
|
||||
download:tiles:
|
||||
desc: Download UK map tiles (PMTiles format from Protomaps)
|
||||
status:
|
||||
- test -f {{.TILES_OUTPUT}}
|
||||
vars:
|
||||
PMTILES_VERSION: "1.22.3"
|
||||
PMTILES_BIN: "{{.DATA_DIR}}/pmtiles"
|
||||
cmds:
|
||||
- |
|
||||
echo "Downloading UK PMTiles (~1.5GB)..."
|
||||
echo "This extracts UK tiles from the Protomaps planet file."
|
||||
echo ""
|
||||
# Download pmtiles CLI if not present
|
||||
if [ ! -f "{{.PMTILES_BIN}}" ]; then
|
||||
echo "Downloading pmtiles CLI v{{.PMTILES_VERSION}}..."
|
||||
curl -sL "https://github.com/protomaps/go-pmtiles/releases/download/v{{.PMTILES_VERSION}}/go-pmtiles_{{.PMTILES_VERSION}}_Linux_x86_64.tar.gz" | tar -xz -C "{{.DATA_DIR}}" pmtiles
|
||||
chmod +x "{{.PMTILES_BIN}}"
|
||||
fi
|
||||
# Extract UK region (bbox: -10.5,49.5,2.5,61)
|
||||
# Using a recent daily build from Protomaps
|
||||
"{{.PMTILES_BIN}}" extract https://build.protomaps.com/20260201.pmtiles {{.TILES_OUTPUT}} --bbox=-10.5,49.5,2.5,61
|
||||
|
||||
prompt:epc:
|
||||
desc: Prompt user to download EPC dataset (requires registration)
|
||||
status:
|
||||
|
|
@ -110,6 +134,12 @@ tasks:
|
|||
cmds:
|
||||
- uv run python -m pipeline.download.broadband --output {{.BROADBAND_OUTPUT}}
|
||||
|
||||
download:postcodes:
|
||||
desc: Download GB postcodes data from MapIt
|
||||
status:
|
||||
- test -f {{.POSTCODES_OUTPUT}}
|
||||
cmds:
|
||||
- uv run python -m pipeline.download.postcodes --output {{.POSTCODES_OUTPUT}}
|
||||
|
||||
download:noise:
|
||||
desc: Download Defra noise data (road, rail, airport) sampled at postcode centroids
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue