SPB Git

Repository Public

08-packs.sh 2.9 KB 66 lines shellscript

1#!/bin/bash2# =============================================================================3#                  SP BOUCHER | INFRASTRUCTURE & AUTOMATION4#             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5# =============================================================================6#7# Project          : KA Maps Engine8# File             : server/pipeline/08-packs.sh9# Module           : server10# Repository       : https://git.spboucher.ai/ka-maps-engine11# Created          : 2026-12-0112# Last Modified    : 2026-12-0113#14# Author           : Simon-Pierre Boucher15# Position         : Professor of Finance16# Institution      : Université du Québec en Outaouais (UQO)17# Organization     : SP Boucher18# Website          : https://spboucher.ai19# Git              : https://git.spboucher.ai20#21# Preferred Contact: support@spboucher.ai22# Technical Contact: dev@spboucher.ai23# Security/Admin   : admin@spboucher.ai24#25# Copyright (c) 202626# Simon-Pierre Boucher27# All rights reserved where applicable. This file is governed by the28# applicable project license, copyright notices and relevant law.29# Existing third-party rights and notices remain unaffected.30#31# License          : None specified (no license file in this repository)32#33# Do not embed credentials, private keys, access tokens,34# certificates or confidential personal information.35#36# =============================================================================37# END OF SP BOUCHER SOURCE HEADER38# =============================================================================3940# Archives régionales PMTiles v3 (hors ligne) pour la version active. Les tuiles viennent du cache41# (générées au besoin). Écrit {id}.pmtiles + {id}.pmtiles.json dans /var/lib/kamaps/packs.42. "$(dirname "$0")/env.sh"43TILER=${KM_TILER:-/usr/local/bin/km-tiler}44OUT=$KM_ROOT/packs; mkdir -p "$OUT"45set -a; . /etc/kamaps/db-ro.env; set +a46# id | titre | ouest,sud,est,nord | zoom min | zoom max47PACKS=${KM_PACKS:-"48quebec-overview|Québec — vue d'ensemble|-79.77,44.99,-57.10,62.59|0|1049montreal|Montréal|-74.00,45.38,-73.45,45.72|0|1450laval-rive-nord|Laval et Rive-Nord|-74.05,45.50,-73.40,45.85|0|1451longueuil-rive-sud|Longueuil et Rive-Sud|-73.62,45.33,-73.20,45.65|0|1452quebec-ville|Ville de Québec|-71.55,46.70,-71.05,46.98|0|1453gatineau|Gatineau|-76.00,45.35,-75.35,45.62|0|1454sherbrooke|Sherbrooke|-72.10,45.30,-71.75,45.50|0|1455trois-rivieres|Trois-Rivières|-72.75,46.25,-72.40,46.45|0|1456saguenay|Saguenay|-71.35,48.30,-70.80,48.50|0|1457"}58echo "$PACKS" | while IFS='|' read -r id title bbox minz maxz; do59  [ -n "$id" ] || continue60  [ -n "${1:-}" ] && [ "$1" != "$id" ] && continue61  log "archive $id ($bbox, z$minz–z$maxz)"62  "$TILER" pack --bbox="$bbox" --minzoom "$minz" --maxzoom "$maxz" --id "$id" --title "$title" \63    --out "$OUT/$id.pmtiles" --concurrency "${KM_THREADS}" | tr -d '\n' | sed 's/  */ /g'; echo64done65log "archives terminées"66
Files main
Menu

Theme