From 16302e1be373eda17bf430bbe613dca822d1efdd Mon Sep 17 00:00:00 2001 From: Stream Date: Sat, 9 May 2026 21:30:01 +0300 Subject: [PATCH] auto-sync: 2026-05-09 21:30:01 --- .../prototype/scripts/download_srtm_all4.sh | 51 +++++++++++++++++++ .../prototype/scripts/download_srtm_all5.sh | 51 +++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 tasks/enduro-trails/prototype/scripts/download_srtm_all4.sh create mode 100644 tasks/enduro-trails/prototype/scripts/download_srtm_all5.sh diff --git a/tasks/enduro-trails/prototype/scripts/download_srtm_all4.sh b/tasks/enduro-trails/prototype/scripts/download_srtm_all4.sh new file mode 100644 index 0000000..d8a39cd --- /dev/null +++ b/tasks/enduro-trails/prototype/scripts/download_srtm_all4.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Download all SRTM tiles for Central Federal District + Chuvashia +# Using curl instead of wget -q to avoid issues + +SRTM_DIR="/home/slin/enduro-trails/data/srtm" +mkdir -p "$SRTM_DIR" +cd "$SRTM_DIR" +BASE_URL="https://s3.amazonaws.com/elevation-tiles-prod/skadi" + +TILES=( + N55E037 N55E038 N55E039 N55E040 + N54E037 N54E038 N54E039 N54E040 + N53E038 N53E039 N53E040 N53E041 + N52E038 N52E039 N52E040 N52E041 + N56E037 N56E038 N56E039 N56E040 + N57E037 N57E038 N57E039 N57E040 + N58E037 N58E038 N58E039 N58E040 + N59E038 N59E039 N59E040 N59E041 + N60E040 N60E041 N60E042 + N54E042 N54E043 N54E044 N54E045 + N53E042 N53E043 N53E044 N53E045 + N52E042 N52E043 N52E044 N52E045 + N51E038 N51E039 N51E040 N51E041 + N50E038 N50E039 N50E040 N50E041 + N55E047 N55E048 N55E049 N55E050 + N54E047 N54E048 N54E049 N54E050 + N56E047 N56E048 N56E049 N56E050 +) + +for tile in "${TILES[@]}"; do + lat="${tile:1:2}" + url="${BASE_URL}/${lat}/${tile}.hgt.gz" + + if [ -f "${tile}.hgt" ]; then + echo "SKIP ${tile}" + continue + fi + + echo "DL ${tile}" + curl -s -L --max-time 60 "$url" -o "${tile}.hgt.gz" + if [ -s "${tile}.hgt.gz" ]; then + gunzip -f "${tile}.hgt.gz" + echo "OK ${tile}" + else + echo "FAIL ${tile}" + rm -f "${tile}.hgt.gz" + fi +done + +echo "" +echo "Total .hgt files: $(ls *.hgt 2>/dev/null | wc -l)" diff --git a/tasks/enduro-trails/prototype/scripts/download_srtm_all5.sh b/tasks/enduro-trails/prototype/scripts/download_srtm_all5.sh new file mode 100644 index 0000000..962fbb9 --- /dev/null +++ b/tasks/enduro-trails/prototype/scripts/download_srtm_all5.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Download all SRTM tiles for Central Federal District + Chuvashia +# Using curl with HTTP code check + +SRTM_DIR="/home/slin/enduro-trails/data/srtm" +mkdir -p "$SRTM_DIR" +cd "$SRTM_DIR" +BASE_URL="https://s3.amazonaws.com/elevation-tiles-prod/skadi" + +TILES=( + N55E037 N55E038 N55E039 N55E040 + N54E037 N54E038 N54E039 N54E040 + N53E038 N53E039 N53E040 N53E041 + N52E038 N52E039 N52E040 N52E041 + N56E037 N56E038 N56E039 N56E040 + N57E037 N57E038 N57E039 N57E040 + N58E037 N58E038 N58E039 N58E040 + N59E038 N59E039 N59E040 N59E041 + N60E040 N60E041 N60E042 + N54E042 N54E043 N54E044 N54E045 + N53E042 N53E043 N53E044 N53E045 + N52E042 N52E043 N52E044 N52E045 + N51E038 N51E039 N51E040 N51E041 + N50E038 N50E039 N50E040 N50E041 + N55E047 N55E048 N55E049 N55E050 + N54E047 N54E048 N54E049 N54E050 + N56E047 N56E048 N56E049 N56E050 +) + +for tile in "${TILES[@]}"; do + lat="${tile:1:2}" + url="${BASE_URL}/${lat}/${tile}.hgt.gz" + + if [ -f "${tile}.hgt" ]; then + echo "SKIP ${tile}" + continue + fi + + echo "DL ${tile}" + HTTP_CODE=$(curl -s -o "${tile}.hgt.gz" -w "%{http_code}" --max-time 60 "$url") + if [ "$HTTP_CODE" = "200" ] && [ -s "${tile}.hgt.gz" ]; then + gunzip -f "${tile}.hgt.gz" + echo "OK ${tile}" + else + echo "FAIL ${tile} (HTTP ${HTTP_CODE})" + rm -f "${tile}.hgt.gz" + fi +done + +echo "" +echo "Total .hgt files: $(ls *.hgt 2>/dev/null | wc -l)"