import leafmap def download_satellite_image(bounding_box, zoom_level=20, output_path='satellite.tif'): """Downloads a GeoTIFF image of a bounding box at zoom level 20 using the `leafmap` library. Args: bounding_box: A tuple of four floats, representing the west, south, east, and north coordinates of the bounding box. zoom_level: The zoom level of the image to download. output_path: The path to save the downloaded image to. Returns: None. """ # Create a Leafmap object. leafmap_obj = leafmap.Map(center=[-122.4194, 37.783], zoom=18) # Add the bounding box to the map. leafmap_obj.add_geojson({ 'type': 'Feature', 'geometry': { 'type': 'Polygon', 'coordinates': [[bounding_box]] }, 'properties': { 'fillOpacity': 0.0 } }) # Set the zoom level of the map. #leafmap_obj.set_view(center=[(bounding_box[0] + bounding_box[2]) / 2, (bounding_box[1] + bounding_box[3]) / 2], zoom=20) # Set the basemap to satellite. leafmap_obj.add_basemap('SATELLITE') # Export the map to GeoTIFF format. leafmap_obj.export_geotiff(output_path) bounding_box = (-122.4194, 37.7833, -122.3853, 37.8042) download_satellite_image(bounding_box)