rrwen / google_streetview Goto Github PK
View Code? Open in Web Editor NEWA command line tool and module for Google Street View Image API
Home Page: https://rrwen.github.io/google_streetview
License: MIT License
A command line tool and module for Google Street View Image API
Home Page: https://rrwen.github.io/google_streetview
License: MIT License
Hello!
On executing the preview() command, no output can be seen. I have set up the API key and also the used the specific location coordinates.
Thanks,
Viraj
.
Hi,
Is it possible to specify the filename of the downloaded images when using results.download_links()?
Thank you
Include multiple arguments for Command Line Interface (CLI) to accept all combinations of heading, fov, and pitch.
For example:
google_streetview --location=46.414382,10.013988;46.414382,10.013988;40.720032,-73.988354 --heading=0;90;180;270 --fov=0;90;120 --pitch -90;0;90
Given 2 locations, 4 headings, 3 fovs, and 3 pitches, the number of images returned from all possible combinations is:
2 x 4 x 3 x 3 = 72 images
The multiple heading parameter is useful for creating panoramic imagery (with rotations from 0 to 270 degrees assuming a fov of 90).
Hi @TMorville
Here is my code:
params = [{
'size': '600x300',
'location': '35.124762, -89.990795',
'heading': '151.78',
'pitch': '-0.76',
}]
results = google_streetview.api.results(params)
results.preview(k=['date', 'status', 'location'], kheader = 'date')
I have set up billing and I am getting this error:
--------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-221-376f3fabd1d8> in <module>()
9 results = google_streetview.api.results(params)
10
---> 11 results.preview(k=['date', 'status', 'location'], kheader = 'date')
/usr/local/lib/python3.6/dist-packages/google_streetview/api.py in preview(self, n, k, kheader)
135
136 # (print_header) Print result header
--> 137 header = '\n[' + str(i) + '] ' + kv[kheader]
138 print(header)
139 print('=' * len(header))
KeyError: 'date
Hello,
When I run the code:
params = [{
'size': '600x300',
'location': '35.124762,-89.990795',
'heading': '151.78',
'pitch': '-0.76',
'key': 'KEY NOT SHARED HERE'
}]
results = google_streetview.api.results(params)
results.preview()
It does not display an image. I am running this code in Google Colab. Here is what I get instead:
[0] DcLKdIVOjVWy1jDDui2kDA
===========================
date: 2019-06
location:
lat: 35.12474824026881
lng: -89.99079815233901
pano_id: DcLKdIVOjVWy1jDDui2kDA
status: OK
How do I get the image from google street view to appear?
Hey,
is there any way to retrieve the panorama links, to access the connected waypoints of the current panorama?
Hi,
I have installed the library and I can download single images. I am working on Ubuntu 16.04, and I installed google_streetview via pip. When I run the command
google_streetview --location=46.414382,10.013988;40.720032,-73.988354
I get my image in the 'downloads" folder. However, if I try with multiple locations:
google_streetview --location=46.414382,10.013988;40.720032,-73.988354
Then I get this error:
[0] vPnURflnc8AZu5NMLYRddw
"==========================="
date: 2014-04
location:
lat: 46.4143421009
lng: 10.0140059536
pano_id: vPnURflnc8AZu5NMLYRddw
status: OK
40.720032,-73.988354: command not found
Whenever I add a second argument to --location (as in this example) or to --headings, the program reports the second argument as a separate command.
Any ideas how to fix this?
Thanks a lot
Cheers
--save_downloads=downloads only creates json file but not jpg images
I want to use the API to send a request to Google static street view API that contains several different lat/long coordinates, bearings, etc.
Running the example in the documentation:
# Import google_streetview for the api and helper module
import google_streetview.api
import google_streetview.helpers
# Create a dictionary with multiple parameters separated by ;
apiargs = {
'location': '46.414382,10.013988;40.720032,-73.988354',
'size': '640x300;640x640',
'heading': '0;90;180;270',
'fov': '0;90;120',
'pitch': '-90;0;90'
}
# Get a list of all possible queries from multiple parameters
api_list = google_streetview.helpers.api_list(apiargs)
# Create a results object for all possible queries
results = google_streetview.api.results(api_list)
# Preview results
results.preview()
# Download images to directory 'downloads'
results.download_links('downloads')
# Save metadata
results.save_metadata('metadata.json')
Simply produces a error:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-396-9db778c1cdf8> in <module>
19
20 # Preview results
---> 21 results.preview()
22
23 # Download images to directory 'downloads'
~/.anaconda3/envs/ox/lib/python3.7/site-packages/google_streetview/api.py in preview(self, n, k, kheader)
135
136 # (print_header) Print result header
--> 137 header = '\n[' + str(i) + '] ' + kv[kheader]
138 print(header)
139 print('=' * len(header))
KeyError: 'pano_id'
The notes section provides any additional text that do not fit into the above sections.
Hi,
I have a WebBrowser control that I am displaying a Google Streetview url in. In a browser such as Chrome, when you navigate the Streetview scene by clicking on the map to move one way or the other, a new url is generated and the map moves. But with the WebBrowser control it does not seem to generate a new url. The map moves, but no new url gets returned. I am using the Navigating and Navigated events, but nothing shows up.
Any advice on how to get things working? I just need to get the url so I can parse out the x/y coordinate and do other things with it.
I've posted on MSDN, but they recommended I use this forum: https://docs.microsoft.com/en-us/answers/questions/953602/wpf-web-browser-control-and-google-streetview.html?childToView=962150#comment-962150
Thanks
Hello, I'm using the api to download ~16k Google Street View photos and around photo 4500 the request timed out. How can I continue downloading from where the request timed out without having to reload the params, from the timed out point, onto the results again.
results = google_streetview.api.results(params)
results.links[4176:].download_links('balt_streetview_downloads')
I want to pick up downloading photos from number 4176. The above doesn't work because results.links is a list and .download_links works on the results. object only.
Really appreciated your sharing with us.
I could only download one normal image, rather than 360 degree, pano image. Could you guide us how to download 360 degree images using the tool?
Thank you
Hi,
I have used the repo and it's great!
Could you tell me if there is an upper limit to the number of locations that can be sent at once to the API?
I entered 49 locations into the helpers.api apiargs dictionary but I only get 10 pano ids (0 to 9) in the command log.
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.