Giter VIP home page Giter VIP logo

streetview's Introduction

streetview

This is a light module for downloading photos from Google street view. The functions allow you to retrieve current and old photos. Google does have an API for accessing Street View. However, it does not allow you to access old photos. Their javascript API allows you to download segments of current photos. This API also allows you to download each full panorama as you see it on Google Street View.

Please note, Google does not maintain the access points used by this API for public use. Therefore, this hack may break if Google makes changes to how Street View works.

Install

Install from pip with:

pip install git+https://github.com/hhe1ibeb/streetview

Quick start

The photos on Google street view are panoramas. Each parnorama has it's own unique ID. Retrieving photos is a two step process. First, you must translate GPS coordinates into panorama IDs. The following code retrieves a list of the closest panoramas.

import streetview
panoids = streetview.panoids(lat=-33.85693857571269, lon=151.2144895142714)

The list contains their ID, exact coordinates, and the year and month the photo was taken if known:

[{
  'lat': -33.8568510378028,
  'panoid': u'aX3nhhCruYOr-i1vSef13Q',
  'lon': 151.2145143359253},
{
  'lat': -33.85702709988117,
  'panoid': u'OH7ReEUauWGKYqUwff4csA',
  'lon': 151.2144704271479},
{
  'lat': -33.85696902229012,
  'panoid': u'73qGSwuFKWAAAAQXLB3qpA',
  'year': 2014,
  'lon': 151.2143939813708,
  'month': 6},
{
  'lat': -33.85698122751459,
  'panoid': u'FE62TMqVMXwAAAQo8C4L6A',
  'year': 2015,
  'lon': 151.214408211074,
  'month': 5},
{
  'lat': -33.85694092862602,
  'panoid': u'pTWGmeN8LTgAAAQqT_-Ekg',
  'year': 2015,
  'lon': 151.2144308896659,
  'month': 6},
{
  'lat': -33.85693857571269,
  'panoid': u'pV6jtRc157XZtWpVIR-rtg',
  'year': 2015,
  'lon': 151.2144895142714,
  'month': 12}
  ]

You can then use the panorama ids to download photos with the following function:

streetview.api_download(panoid, heading, flat_dir, key)

Documentation

Full documentation is at docs/build/html/index.html

streetview's People

Contributors

azarz avatar hhe1ibeb avatar miliasv avatar robolyst avatar rodrigoberriel avatar theturehooha avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.