mirror of
https://github.com/dataforcanada/d4c-datapkg-foundation.git
synced 2026-06-13 14:20:52 +02:00
Modify scripts for ca_statcan_open_database_of_buildings_2025-04-15
This commit is contained in:
@@ -9,6 +9,7 @@ DATASET_ID="ca_statcan_open_database_of_buildings_2025-04-15"
|
||||
OUTPUT_GEOPACKAGE="${SCRATCH_FOLDER}/${DATASET_ID}/${DATASET_ID}.gpkg"
|
||||
OUTPUT_FLATGEOBUF="${SCRATCH_FOLDER}/${DATASET_ID}/${DATASET_ID}.fgb"
|
||||
|
||||
# Merge all of the GeoPackages into one
|
||||
FIRST=true
|
||||
for FILE in ${SCRATCH_FOLDER}/${DATASET_ID}/ODB*.gpkg; do
|
||||
if [ "${FILE}" == "${OUTPUT_GEOPACKAGE}" ]; then
|
||||
@@ -24,13 +25,14 @@ for FILE in ${SCRATCH_FOLDER}/${DATASET_ID}/ODB*.gpkg; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Create a FlatGeoBuf from the GeoPackage
|
||||
echo "Creating ${OUTPUT_FLATGEOBUF} from ${OUTPUT_GEOPACKAGE}"
|
||||
ogr2ogr -f FlatGeobuf \
|
||||
-progress \
|
||||
-t_srs EPSG:4326 \
|
||||
-nlt "MULTIPOLYGON2D" \
|
||||
-lco "TITLE=Open Database of Buildings (ODB) - Statistics Canada / Base de données ouverte sur les bâtiments (BDOB) - Statistique Canada" \
|
||||
-lco "DESCRIPTION=Harmonized building footprints and attributes across Canada, optimized for cloud-native GIS workflows. / Empreintes et attributs de bâtiments harmonisés à l'échelle du Canada, optimisés pour les flux de travail SIG infonuagiques" \
|
||||
-lco "TITLE=Open Database of Buildings (ODB) from Statistics Canada for 2025-04-15 / Base de données ouverte sur les bâtiments (BDOB) de Statistique Canada pour le 2025-04-15" \
|
||||
-lco "DESCRIPTION=Harmonized building footprints and attributes across Canada / Empreintes et attributs de bâtiments harmonisés à l'échelle du Canada" \
|
||||
"${OUTPUT_FLATGEOBUF}" \
|
||||
"${OUTPUT_GEOPACKAGE}"
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRATCH_FOLDER="${HOME}/tmp/dataforcanada/process-foundation-dev"
|
||||
DATASET_ID="ca_statcan_open_database_of_buildings_2025-04-15"
|
||||
INPUT_FILE="${SCRATCH_FOLDER}/${DATASET_ID}/${DATASET_ID}.fgb"
|
||||
|
||||
ARGS=(
|
||||
-progress
|
||||
-name "Open Database of Buildings (ODB) from Statistics Canada for 2025-04-15 / Base de données ouverte sur les bâtiments (BDOB) de Statistique Canada pour le 2025-04-15"
|
||||
-description "Harmonized building footprints and attributes across Canada / Empreintes et attributs de bâtiments harmonisés à l'échelle du Canada"
|
||||
-attribution "Source: https://www150.statcan.gc.ca/n1/en/catalogue/34260001 / Source: https://www150.statcan.gc.ca/n1/en/catalogue/34260001"
|
||||
-mbtiles_compatible
|
||||
-srs_epsg
|
||||
-vector_compress
|
||||
-work_dir ~/tmp/maptiler_engine
|
||||
-o "${SCRATCH_FOLDER}/${DATASET_ID}/${DATASET_ID}.mbtiles"
|
||||
"${INPUT_FILE}"
|
||||
)
|
||||
|
||||
maptiler-engine "${ARGS[@]}"
|
||||
Reference in New Issue
Block a user