streetget
BETAstreetget
is a small python package for StreetView image downloading. It allows to you to crawl and download the StreetView panoramas along with its metadata and depth maps. It also allows you to download the StreetView time-machine historical panoramas.
Example 1: Prague is a beautiful city! Download panoramas inside a rectangle of the width 300m and height 200m centered at 50.0833°N, 14.4167°E. Download panoramas of the zoom levels 0,1 and 3, store metadata, depth-map data and the depth-map thumbnails. Download also historical time-machine panoramas, save the data to /local/myData
and name the dataset
'Prague_all'.
streetget box 50.0833 14.4167 300 200 -itd -z 0,1,3 -D /local/myData Prague_all
DB size: 000056 Q size: 00016 00047/min avg 00041/min
DB size: 000061 Q size: 00011 00059/min avg 00042/min
DB size: 000065 Q size: 00007 00047/min avg 00043/min
...
DB size
indicates how many panoramas are already in the database (stored panoramas), Q size
indicate how many panoramas wait in the queue. The next two columns indicate the actual and average download speed.
Example 2: Restore previous 'Prague_all' download after Ctrl-c keyboard interrupt or forced computer shutdown.
streetget resume -D /local/myData Prague_all
Resuming command:
streetget box 50.0833 14.4167 300 200 -itd -z 0,1,3 -D /local/myData Prague_all
DB size: 000078 Q size: 00012 00000/min avg 00000/min
...
Example 3: Fetch only StreetView metadata from circular area of the radius 300m starting at GPS location
48.8567°N 2.3508°N, label the data as 'Paris' and save it to ~/datasets
directory:
streetget circle 48.8567 2.3508 300 -D ~/datasets Paris
Example 4: Get info about available panoramas at location 50.0833°N, 14.4167°N.
streetget info 50.0833 14.4167
latlng: 50.083470, 14.416540
pano id: b5KMHLrX55jsWzsDZ_z0bg
date: 2014, 4
Saptial neighbours [id]:
------------------------
NIsq7Xg-HztpzjA2H_IGoA
L-p2EeOaJZewg8ZXAYwFAw
j3DbvTldnlsAAAQfCOywVw
Temporal neighbours [id year, month]:
-------------------------------------
YX3qsOxeKkxehNr8qQ59Vg 2009, 5
6llp-LT4nAtCfs1SsyNyYA 2009, 9
rkQFq5F8JgdTbfBEt1pbBQ 2011, 8
c4JXOQ0o1QkdEBMdSWgBwA 2012, 3
Example 5: Show the panorama image given by panorama hash id 6llp-LT4nAtCfs1SsyNyYA:
streetget show 6llp-LT4nAtCfs1SsyNyYA
The package is tested with Python 2.7 and requires several packages such as utm, matplotlib, numpy, docopt, Pillow and requests[secure].
Clone
or download the
zip file an extract it to any directory, for example ~/streetget
. Go to the directory and run sudo python setup.py install
.
If you do not wish to install the package, there is yet a simple way to use it: Just clone the 'streetget' to any directory e.g.
~/streetget/
and inside the directory do chmod 755 streetget/streetget.py
. Then create a symbolic link sudo ln -s
/home/user/streetget/streetget/streetget.py /usr/bin/streetget
. Or you can add alias to your .bash_aliases
, for instance add line
alias streetget='~/streetget/streetget/streetget.py'
. The code can be also run directly calling the streetget.py
with arguments.
streetget circle ( (LAT LNG) | PID) R [-tid -D DIR -z ZOOM] LABEL
streetget box ( (LAT LNG) | PID) W H [-tid -D DIR -z ZOOM] LABEL
streetget gpsbox LAT LNG LAT_TL LNG_TL LAT_BR LNG_BR [options] LABEL
streetget resume [-D DIR] LABEL
streetget info ( (LAT LNG) | PID)
streetget show PID
circle Downloads street-view inside circular area
centered at LAT, LNG and radius R meters.
box Downloads street-view in rectangular area
of the width W and height H meters centered
at LAT, LNG
gpsbox Downloads street-view inside GPS rectangle
defined by top-left corner LAT_TL, LNG_TL
and bottom-right corner LAT_BR, LNG_BR. Download
starts at location LAT, LNG
resume Resumes interrupted downloading. Only
directory flag -D DIR is allowed. Other
flags will be restored from the interrupted
session.
info Prints info about the closest panorama at LAT,
LNG position or info about panorama id PID.
show Shows panorama image at zoom level 2 in default
python image browser.
LABEL Data set label. Will be used as a directory name.
LAT, LNG Starting point latitude and longitude.
LAT_TL, LNG_TL Top-left corner latitude, longitude.
LAT_BR, LNG_BR Bottom-right corner latitude, longitude.
PID Panorama id hash code.
W, H Width and height in meters.
R Radius in meters.
Note: A MINUS sign (dash) is NOT allowed for negative numbers. Instead use character 'n' to indicate negative value. For instance, use n1.23 instead of -1.23.
-t Time machine, include temporal panorama neighbours.
-i Save images, if unset only metadata are fetched and saved.
-d Save depth data and depth map thumbnails at zoom level 0.
-z ZOOM Comma separated panorama zoom levels [0-5] to be
downloaded [default: 0,5]
-D DIR Root directory. Data will be saved in DIR/LABEL/
[default: ./]
-h, --help Prints this screen.
GitHub repository git clone https://github.com/gronat/streetget.git
or download as a zip file.