google_satellite#

This module defines GoogleSatellite class downloading Google satellite imagery.

Classes#

GoogleSatellite

A class for downloading satellite imagery from Google tilemaps.

Module Contents#

class openplaces.io.scrapers.google_satellite.GoogleSatellite#

A class for downloading satellite imagery from Google tilemaps.

Provides functionality to obtain satellite images for assets defined in an AssetInventory. Images are retrieved based on the coordinates of the assets and saved to a specified directory.

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

Get satellite images of buildings given 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.

  • redownload – Missing images are always downloaded. When True, images that already exist on disk are re-downloaded (overwritten) rather than reused.

Returns:

An ImageSet for the assets in the inventory.

Return type:

ImageSet

Raises:

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