BingOrthomosaicExtractor#
- class rapidtools.processing.BingOrthomosaicExtractor(zoom_level: int = 19, max_workers: int = 10, cancel_event: Event | None = None)[source]#
Bases:
TileOrthomosaicExtractorComponent that extracts and synthesizes aerial imagery from Bing Maps Tiles.
Downloads Bing Maps aerial tiles for a given geographical region and stitches them into a single, continuous GeoTIFF. The resulting synthetic orthomosaic retains its coordinate metadata (EPSG:4326) and can be directly fed into region-wide feature extractors (like
SAM3OrthoFeatureExtractor) just like a standard drone flight or satellite capture.- Parameters:
zoom_level (int, optional) – The detail level of the Bing Maps tiles to download, typically ranging from 1 (entire world) to 19 (0.3m/pixel). Defaults to 19.
max_workers (int, optional) – The number of concurrent threads to use for downloading tiles in parallel. Defaults to 10.
cancel_event (Event | None, optional) – Cooperative cancellation flag checked as tiles complete. When set, outstanding downloads are cancelled and
OperationCancelledis raised. Defaults toNone.
Example
>>> from rapidtools.core import BoundingBox >>> from rapidtools.processing import BingOrthomosaicExtractor >>> >>> # Define the area of interest: >>> region = BoundingBox( ... min_x=-118.251, min_y=34.050, max_x=-118.245, max_y=34.055 ... ) >>> >>> # Initialize the extractor and stitch the region into a TIFF: >>> extractor = BingOrthomosaicExtractor(zoom_level=19) >>> tiff_path = extractor(region, output_path='downtown_la.tiff') >>> tiff_path.suffix '.tiff'
Methods
lat_lon_to_pixelConvert latitude and longitude to global Web Mercator pixel coordinates.
Convert tile XY coordinates into a Bing Maps Quadkey string.