2024-08-24 19:02:27 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
temp=$(mktemp -d)
|
2024-09-13 20:34:50 +00:00
|
|
|
zoom=$(jq '.maxZoom // 10' "$1/layers.json")
|
2024-08-24 19:02:27 +00:00
|
|
|
|
|
|
|
mkdir "$temp/data"
|
|
|
|
for i in "$1/data/"*
|
|
|
|
do
|
2024-08-24 20:31:56 +00:00
|
|
|
ogrmerge.py -single -o "$temp/$(basename $i).json" "$i"/*
|
2024-08-24 19:02:27 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
|
2024-09-13 20:34:50 +00:00
|
|
|
tippecanoe -aN -z"$zoom" -o "$temp/strecken.pmtiles" $temp/*.json
|
2024-08-24 19:02:27 +00:00
|
|
|
|
|
|
|
mv $temp/strecken.pmtiles "$2"
|
|
|
|
|
|
|
|
rm -r $temp
|