google_streetview#

This module defines GoogleStreetview class downloading Google street imagery.

Classes#

GoogleStreetview

A class that downloads street-level imagery and depth maps for buildings.

Module Contents#

class openplaces.io.scrapers.google_streetview.GoogleStreetview(input_data: dict[str, Any])#

A class that downloads street-level imagery and depth maps for buildings.

Interfaces with the Google Street View API to obtain high-resolution street-level images and corresponding depth maps based on specified building footprints.

api_key#

API key for authenticating requests to the Google Street View API.

get_images(inventory: openplaces.io.scrapers.types.AssetInventory, save_directory: str, entity_type: str = 'entity', download_year: int | None = None) openplaces.io.scrapers.types.ImageSet#

Get street-level images of buildings from footprints in AssetInventory.

Parameters:
  • inventory – AssetInventory for which the images will be retrieved.

  • save_directory – Path to the folder where the retrieved images will be saved.

  • entity_type – Type of entity being photographed (e.g. ‘footprint’, ‘parcel’). Used as a filename prefix.

  • download_year – Year the images are fetched; appended as a filename suffix.

Returns:

An ImageSet for the assets in the inventory.

Return type:

ImageSet

Raises:

ValueError – If the provided inventory is not an instance of AssetInventory.