GoogleOrthomosaicExtractor

GoogleOrthomosaicExtractor#

class rapidtools.processing.GoogleOrthomosaicExtractor(zoom_level: int = 19, max_workers: int = 10, layer: str = 's', cancel_event: Event | None = None)[source]#

Bases: TileOrthomosaicExtractor

Component that stitches Google Maps satellite tiles into a GeoTIFF.

Uses the keyless mt0-mt3.google.com tile servers (the same source as GoogleAerialImageExtractor), so it is a drop-in alternative to BingOrthomosaicExtractor when Bing’s imagery of an area is outdated or missing.

Parameters:
  • zoom_level (int, optional) – Tile zoom level, up to about 21 in urban areas. Defaults to 19.

  • max_workers (int, optional) – Number of concurrent download threads. Defaults to 10.

  • layer (str, optional) – 's' for satellite (default) or 'y' for the hybrid layer with labels.

  • cancel_event (Event | None, optional) – Cooperative cancellation flag checked as tiles complete.

Example

>>> from rapidtools.core import BoundingBox
>>> from rapidtools.processing import GoogleOrthomosaicExtractor
>>> region = BoundingBox(-118.1355, 34.1870, -118.1340, 34.1885)
>>> extractor = GoogleOrthomosaicExtractor(zoom_level=20)
>>> tiff_path = extractor(region, output_path='altadena_google.tiff')
>>> tiff_path.name
'altadena_google.tiff'

Methods

lat_lon_to_pixel

Convert latitude and longitude to global Web Mercator pixel coordinates.