Created
May 17, 2016 07:20
-
-
Save letalvoj/c750a990b0995923ad53b7f077dff565 to your computer and use it in GitHub Desktop.
Script for downloading panoramas from google street view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
AGENT='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36'; | |
PANOID='Xow4B2hLPjwWMR10JcaB7A'; | |
for j in {0..12}; do | |
jj=$(printf %02d $j) | |
for i in {0..25}; do | |
ii=$(printf %02d $i) | |
URL="https://geo2.ggpht.com/cbk?cb_client=maps_sv.tactile&authuser=0&hl=en&panoid=$PANOID&output=tile&x=$i&y=$j&zoom=5&nbt&fover=2"; | |
FILE="tile$(printf %02d $i)-$(printf %02d $j).jpg" | |
echo $URL to $FILE; | |
curl -s -A "$AGENT" $URL -o $FILE; | |
sleep 0.076 | |
done; | |
convert tile*-$jj.jpg +append output$jj.jpg; | |
convert output$jj.jpg -resize 13312x512 output$jj.jpg; | |
done; | |
convert output[0-2][0-9].jpg -append output.jpg; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment