From 9f301680e2f1b91c7dbc662fb3a67f4348bb8773 Mon Sep 17 00:00:00 2001 From: Jonas Eberle Date: Tue, 10 Dec 2024 23:46:17 +0100 Subject: [PATCH] prevent lat wrap-around and refactor elevation rules --- bin/genMakefileElevationRules | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/genMakefileElevationRules b/bin/genMakefileElevationRules index 6a769ce..9f926e6 100755 --- a/bin/genMakefileElevationRules +++ b/bin/genMakefileElevationRules @@ -13,13 +13,16 @@ for lat in $(seq -90 90); do for dLon in -1 0 1; do for dLat in -1 0 1; do _lat="$((lat + dLat))" + [ $_lat -lt -90 -o $_lat -gt 90 ] && continue # wrap around although not needed in 100 years. Elevation data for the Aleutians anybody? _lon="$(( ($lon + $dLon + 540) % 360 - 180))" printf "var/run/tile_%+03d%+04d.elevation " "$_lat" "$_lon" done done - echo '|$(@D)' + echo + echo ' @touch $@' echo ' @echo "[$@]"' + echo ' @mkdir -p var/run/' echo ' @touch $@' done done