Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rv2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Phyks
rv2
Commits
84e6db51
Commit
84e6db51
authored
Jan 19, 2015
by
Jean-Benoist Leger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.crans.org:leger/rv2
parents
834b1c4a
95f81f9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
scripts/dlsrtm
scripts/dlsrtm
+46
-0
No files found.
scripts/dlsrtm
0 → 100755
View file @
84e6db51
#!/bin/bash
if
[[
$#
-lt
2
]]
then
echo
"Usage:
$0
list_needed_srtm_tiles srtmzip/"
>
&2
exit
1
fi
directory
=
"
$2
/"
list_needed_tiles
=
$1
baseurls
=
"http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Africa
http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Australia
http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia
http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Islands
http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/North_America
http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/South_America"
mkdir
-p
$directory
cat
$list_needed_tiles
|
while
read
one_line
do
lon
=
$(
printf
--
"
$one_line
"
|
cut
-f
1
)
lat
=
$(
printf
--
"
$one_line
"
|
cut
-f
2
)
if
[[
$lat
-ge
0
]]
# 0 is N
then
strlat
=
$(
printf
"N%02d"
$lat
)
else
strlat
=
$(
printf
"S%02d"
$((
-
$lat
))
)
fi
if
[[
$lon
-ge
0
]]
# 0 is E
then
strlon
=
$(
printf
"E%03d"
$lon
)
else
strlon
=
$(
printf
"W%03d"
$((
-
$lon
))
)
fi
name
=
$strlat$strlon
.hgt
for
baseurl
in
$baseurls
do
printf
"
$baseurl
/
$name
.zip
\n
"
done
done
| wget
-c
-i
-
-P
"
$directory
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment