Skip to content

Documentation for image_retrieval

Path: image_utils/image_retrieval.py

Functions

is_image_too_gray

Check if an image has too much gray content.

Args: image: PIL Image object

Returns: bool: True if image is too gray, False otherwise

get_best_zoom_level_for_region

Find the best zoom level for a region by testing different zoom levels and checking for gray images.

Args: minx, miny, maxx, maxy: Bounding box coordinates image_provider: Image provider instance initial_zoom: Starting zoom level to test

Returns: int: Best zoom level found, or None if no good image found

geojson_to_geotiff

Convert GeoJSON to GeoTIFF with USGS Imagery Topo with random padding.

process_file

Process a single GeoJSON file and return the result.

process_directory

Process all GeoJSON files in a directory using parallel processing.

main

No description provided.