Skip to content

Download Module

The geefetch.data.get module contains the primary functions for initiating and managing satellite data downloads from Google Earth Engine.

geefetch.data.get

download_time_series(data_dir, bbox, satellite, start_date, end_date, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, satellite_get_kwargs=None, satellite_download_kwargs=None, check_clean=True, filter_polygon=None, **kwargs)

Download time series of images from a specific satellite. Images are written in several .tif chips grouped in subdirectories in dir. Each subdirectory contains the time series of images of a single spatial tile.

Parameters:

Name Type Description Default
data_dir Path

Directory or file name to write the downloaded files to. If a directory, the default satellite name is used as a base name.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
satellite SatelliteABC

The satellite which the images should originate from.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10 Mb.

10
satellite_get_kwargs dict[str, Any] | None

Satellite-dependent parameters for getting data. Defaults to None.

None
satellite_download_kwargs dict[str, Any] | None

Satellite-dependent parameters for downloading data. Defaults to None.

None
check_clean bool

Whether to check if the data is clean. Defaults to True.

True
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
**kwargs Any

Accepted but ignored additional arguments.

{}
Source code in src/geefetch/data/get.py
def download_time_series(
    data_dir: Path,
    bbox: GeoBoundingBox,
    satellite: SatelliteABC,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    satellite_get_kwargs: dict[str, Any] | None = None,
    satellite_download_kwargs: dict[str, Any] | None = None,
    check_clean: bool = True,
    filter_polygon: shapely.Geometry | None = None,
    **kwargs: Any,
) -> None:
    """Download time series of images from a specific satellite. Images are written in several .tif
    chips grouped in subdirectories in `dir`. Each subdirectory contains the time series of images
    of a single spatial tile.

    Parameters
    ----------
    data_dir : Path
        Directory or file name to write the downloaded files to. If a directory,
        the default `satellite` name is used as a base name.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    satellite : SatelliteABC
        The satellite which the images should originate from.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error.
        Defaults to 10 Mb.
    satellite_get_kwargs : dict[str, Any] | None
        Satellite-dependent parameters for getting data. Defaults to None.
    satellite_download_kwargs : dict[str, Any] | None
        Satellite-dependent parameters for downloading data. Defaults to None.
    check_clean : bool
        Whether to check if the data is clean. Defaults to True.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    **kwargs : Any
        Accepted but ignored additional arguments.
    """
    for kwarg in kwargs:
        log.warning(f"Argument {kwarg} is ignored.")
    if not data_dir.is_dir():
        raise ValueError(f"Invalid path {data_dir}. Expected an existing directory.")
    satellite_get_kwargs = satellite_get_kwargs if satellite_get_kwargs is not None else {}
    satellite_download_kwargs = (
        satellite_download_kwargs if satellite_download_kwargs is not None else {}
    )
    tiler = Tiler()
    tracker = TileTracker(satellite, data_dir)
    with default_bar() as progress:
        tiles = list(
            tiler.split(bbox, resolution * tile_shape, filter_polygon=filter_polygon, crs=crs)
        )

        overall_task = progress.add_task(
            f"[magenta]Downloading {satellite.full_name} chips...[/]",
            total=len(tiles),
        )

        for tile in tiles:
            data_get_kwargs = (
                dict(
                    aoi=tile,
                    start_date=start_date,
                    end_date=end_date,
                )
                | satellite_get_kwargs
            )
            tile_path = tracker.get_path(tile, format=satellite_download_kwargs.get("format", None))
            download_chip_ts(
                satellite.get_time_series,
                data_get_kwargs,
                tile,
                satellite,
                resolution,
                tile_path.with_name(tile_path.stem),
                progress=progress,
                selected_bands=selected_bands,
                max_tile_size=max_tile_size,
                **satellite_download_kwargs,
            )
            progress.update(overall_task, advance=1)
        if satellite.is_raster:
            _create_vrts(tracker)
    log.info(
        f"[green]Finished[/] downloading {satellite.full_name} chips to [cyan]{tracker.root}[/]"
    )

download(data_dir, bbox, satellite, start_date, end_date, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, satellite_get_kwargs=None, satellite_download_kwargs=None, check_clean=True, filter_polygon=None, in_parallel=False, max_workers=10)

Download images from a specific satellite. Images are written in several .tif chips to dir. Additionally, a file .vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory or file name to write the downloaded files to. If a directory, the default satellite name is used as a base name.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
satellite SatelliteABC

The satellite which the images should originate from.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used. Defaults to None.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10 Mb.

10
satellite_get_kwargs dict[str, Any] | None

Satellite-dependent parameters for getting data. Defaults to None.

None
satellite_download_kwargs dict[str, Any] | None

Satellite-dependent parameters for downloading data. Defaults to None.

None
check_clean bool

Whether to check if the data is clean. Defaults to True.

True
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
in_parallel bool

Whether to send parallel download requests. Do not use if the download backend is already threaded (e.g., :class:geefetch.data.downloadable.geedim). Defaults to False.

False
max_workers int

How many parallel workers are used in case in_parallel is True. Defaults to 10.

10
Source code in src/geefetch/data/get.py
def download(
    data_dir: Path,
    bbox: GeoBoundingBox,
    satellite: SatelliteABC,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    satellite_get_kwargs: dict[str, Any] | None = None,
    satellite_download_kwargs: dict[str, Any] | None = None,
    check_clean: bool = True,
    filter_polygon: shapely.Geometry | None = None,
    in_parallel: bool = False,
    max_workers: int = 10,
) -> None:
    """Download images from a specific satellite. Images are written in several .tif chips
    to `dir`. Additionally, a file `.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory or file name to write the downloaded files to. If a directory,
        the default `satellite` name is used as a base name.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    satellite : SatelliteABC
        The satellite which the images should originate from.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
        Defaults to None.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error.
        Defaults to 10 Mb.
    satellite_get_kwargs : dict[str, Any] | None
        Satellite-dependent parameters for getting data. Defaults to None.
    satellite_download_kwargs : dict[str, Any] | None
        Satellite-dependent parameters for downloading data. Defaults to None.
    check_clean : bool
        Whether to check if the data is clean. Defaults to True.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    in_parallel : bool
        Whether to send parallel download requests. Do not use if the download backend
        is already threaded (e.g., :class:`geefetch.data.downloadable.geedim`). Defaults to False.
    max_workers : int
        How many parallel workers are used in case `in_parallel` is True. Defaults to 10.
    """
    if not data_dir.is_dir():
        raise ValueError(f"Invalid path {data_dir}. Expected an existing directory.")
    satellite_get_kwargs = satellite_get_kwargs if satellite_get_kwargs is not None else {}
    satellite_download_kwargs = (
        satellite_download_kwargs if satellite_download_kwargs is not None else {}
    )
    tiler = Tiler()
    tracker = TileTracker(satellite, data_dir)
    with default_bar() as progress:
        tiles = list(
            tiler.split(bbox, resolution * tile_shape, filter_polygon=filter_polygon, crs=crs)
        )

        overall_task = progress.add_task(
            f"[magenta]Downloading {satellite.full_name} chips...[/]",
            total=len(tiles),
        )

        with ThreadPoolExecutor(max_workers=max_workers) as executor:
            futures = []
            for tile in tiles:
                data_get_kwargs = (
                    dict(
                        aoi=tile,
                        start_date=start_date,
                        end_date=end_date,
                    )
                    | satellite_get_kwargs
                )
                tile_path = tracker.get_path(
                    tile, format=satellite_download_kwargs.get("format", None)
                )
                if not in_parallel:
                    download_chip(
                        satellite.get,
                        data_get_kwargs,
                        tile,
                        satellite,
                        resolution,
                        tile_path,
                        progress=progress,
                        selected_bands=selected_bands,
                        max_tile_size=max_tile_size,
                        check_clean=check_clean,
                        **satellite_download_kwargs,
                    )
                    progress.update(overall_task, advance=1)
                else:
                    future = executor.submit(
                        download_chip,
                        satellite.get,
                        data_get_kwargs,
                        tile,
                        satellite,
                        resolution,
                        tile_path,
                        progress=progress,
                        selected_bands=selected_bands,
                        max_tile_size=max_tile_size,
                        check_clean=check_clean,
                        **satellite_download_kwargs,
                    )
                    futures.append(future)
            if in_parallel:
                try:
                    for _ in as_completed(futures):
                        progress.update(overall_task, advance=1)
                except KeyboardInterrupt:
                    executor.shutdown(wait=False, cancel_futures=True)
                    log.error(
                        "Keyboard interrupt. "
                        "Please wait while current download finish (up to a few minutes)."
                    )
                    raise
    if satellite.is_raster:
        _create_vrts(tracker)
    if satellite.is_vector and "format" in satellite_download_kwargs:
        match satellite_download_kwargs["format"]:
            case Format.PARQUET:
                merge_tracked_parquet(
                    TileTracker(satellite, data_dir, filter=lambda p: p.suffix == ".parquet")
                )
            case Format.GEOJSON:
                merge_tracked_geojson(
                    TileTracker(satellite, data_dir, filter=lambda p: p.suffix == ".geojson")
                )
            case _ as x:
                log.info(f"Don't know how to merge data of type {x}. Not merging.")

    log.info(
        f"[green]Finished[/] downloading {satellite.full_name} chips to [cyan]{tracker.root}[/]"
    )

download_gedi(data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None)

Download GEDI images fused as rasters. Images are written in several .tif chips to data_dir. Additionally, a file gedi.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
Source code in src/geefetch/data/get.py
def download_gedi(
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Geometry | None = None,
) -> None:
    """Download GEDI images fused as rasters. Images are written in several .tif chips
    to `data_dir`. Additionally, a file `gedi.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    """
    download_func = (
        download_time_series if composite_method == CompositeMethod.TIMESERIES else download
    )
    download_func(
        data_dir=data_dir,
        bbox=bbox,
        satellite=GEDIraster(),
        start_date=start_date,
        end_date=end_date,
        selected_bands=selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        in_parallel=True,
        max_workers=3,
        check_clean=False,
        filter_polygon=filter_polygon,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "dtype": dtype,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )

download_gedi_vector(data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, tile_shape=500, resolution=10, filter_polygon=None, format=Format.CSV)

Download GEDI vector points. Points are written in several .geojson files to data_dir.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
format Format

Format in which to save the vector points. Defaults to Format.CSV.

CSV
Source code in src/geefetch/data/get.py
def download_gedi_vector(
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    tile_shape: int = 500,
    resolution: int = 10,
    filter_polygon: shapely.Geometry | None = None,
    format: Format = Format.CSV,
) -> None:
    """Download GEDI vector points. Points are written in several .geojson files
    to `data_dir`.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    format : Format
        Format in which to save the vector points. Defaults to Format.CSV.
    """
    download(
        data_dir=data_dir,
        bbox=bbox,
        satellite=GEDIvector(),
        start_date=start_date,
        end_date=end_date,
        selected_bands=selected_bands,
        crs=crs,
        tile_shape=tile_shape,
        resolution=resolution,
        filter_polygon=filter_polygon,
        in_parallel=False,
        check_clean=False,
        satellite_download_kwargs={"format": format},
    )

download_s1(data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None, orbit=S1Orbit.ASCENDING)

Download Sentinel-1 images. Images are written in several .tif chips to data_dir. Additionally, a file s1.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
orbit S1Orbit

The orbit used to filter Sentinel-1 images. Defaults to S1Orbit.ASCENDING.

ASCENDING
Source code in src/geefetch/data/get.py
def download_s1(
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Geometry | None = None,
    orbit: S1Orbit = S1Orbit.ASCENDING,
) -> None:
    """Download Sentinel-1 images. Images are written in several .tif chips
    to `data_dir`. Additionally, a file `s1.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    orbit : S1Orbit
        The orbit used to filter Sentinel-1 images. Defaults to S1Orbit.ASCENDING.
    """
    download_func = (
        download_time_series if (composite_method == CompositeMethod.TIMESERIES) else download
    )

    download_selected_bands: list[str] | None
    if orbit == S1Orbit.AS_BANDS and composite_method != CompositeMethod.TIMESERIES:
        selected_bands = (
            selected_bands if selected_bands is not None else S1().default_selected_bands
        )
        download_selected_bands = [
            *(f"{band}_ascending" for band in selected_bands),
            *(f"{band}_descending" for band in selected_bands),
        ]
    else:
        download_selected_bands = selected_bands
    download_func(
        data_dir=data_dir,
        bbox=bbox,
        satellite=S1(),
        start_date=start_date,
        end_date=end_date,
        selected_bands=download_selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        filter_polygon=filter_polygon,
        in_parallel=True,
        max_workers=3,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "dtype": dtype,
            "orbit": orbit,
            "selected_bands": selected_bands,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )

download_s2(data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None, cloudless_portion=60, cloud_prb_thresh=40)

Download Sentinel-2 images. Images are written in several .tif chips to data_dir. Additionally, a file s2.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
cloudless_portion int

Portion of the image expected to be cloudless. See :meth:geefetch.data.s2.get. Defaults to 60.

60
cloud_prb_thresh int

Cloud probability threshold. See :meth:geefetch.data.s2.get. Defaults to 40.

40
Source code in src/geefetch/data/get.py
def download_s2(
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Geometry | None = None,
    cloudless_portion: int = 60,
    cloud_prb_thresh: int = 40,
) -> None:
    """Download Sentinel-2 images. Images are written in several .tif chips
    to `data_dir`. Additionally, a file `s2.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    cloudless_portion : int
        Portion of the image expected to be cloudless.
        See :meth:`geefetch.data.s2.get`. Defaults to 60.
    cloud_prb_thresh : int
        Cloud probability threshold. See :meth:`geefetch.data.s2.get`. Defaults to 40.
    """
    download_func = (
        download_time_series if composite_method == CompositeMethod.TIMESERIES else download
    )
    download_func(
        data_dir=data_dir,
        bbox=bbox,
        satellite=S2(),
        start_date=start_date,
        end_date=end_date,
        selected_bands=selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        in_parallel=True,
        max_workers=3,
        filter_polygon=filter_polygon,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "cloudless_portion": cloudless_portion,
            "cloud_prb_thresh": cloud_prb_thresh,
            "dtype": dtype,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )

download_dynworld(data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None)

Download Dynamic World images. Images are written in several .tif chips to data_dir. Additionnally a file dynworld.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
Source code in src/geefetch/data/get.py
def download_dynworld(
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Geometry | None = None,
) -> None:
    """Download Dynamic World images. Images are written in several .tif chips
    to `data_dir`. Additionnally a file `dynworld.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    """
    download_func = (
        download_time_series if composite_method == CompositeMethod.TIMESERIES else download
    )
    download_func(
        data_dir=data_dir,
        bbox=bbox,
        satellite=DynWorld(),
        start_date=start_date,
        end_date=end_date,
        selected_bands=selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        in_parallel=True,
        max_workers=3,
        filter_polygon=filter_polygon,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "dtype": dtype,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )

download_landsat8(data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, resolution=30, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None)

Download Landsat 8 images. Images are written in several .tif chips to data_dir. Additionally, a file landsat8.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 30.

30
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
Source code in src/geefetch/data/get.py
def download_landsat8(
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 30,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Geometry | None = None,
) -> None:
    """Download Landsat 8 images. Images are written in several .tif chips
    to `data_dir`. Additionally, a file `landsat8.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 30.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    """
    download_func = (
        download_time_series if composite_method == CompositeMethod.TIMESERIES else download
    )
    download_func(
        data_dir=data_dir,
        bbox=bbox,
        satellite=Landsat8(),
        start_date=start_date,
        end_date=end_date,
        selected_bands=selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        filter_polygon=filter_polygon,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "dtype": dtype,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )

download_palsar2(data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, resolution=30, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None, orbit=P2Orbit.DESCENDING)

Download Palsar 2 images. Images are written in several .tif chips to data_dir. Additionally, a file palsar2.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 30.

30
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Geometry | None

More fine-grained AOI than bbox. Defaults to None.

None
orbit P2Orbit

The orbit used to filter Palsar-2 images. Defaults to P2Orbit.ASCENDING.

DESCENDING
Source code in src/geefetch/data/get.py
def download_palsar2(
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 30,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Geometry | None = None,
    orbit: P2Orbit = P2Orbit.DESCENDING,
) -> None:
    """Download Palsar 2 images. Images are written in several .tif chips
    to `data_dir`. Additionally, a file `palsar2.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 30.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Geometry | None
        More fine-grained AOI than `bbox`. Defaults to None.
    orbit : P2Orbit
        The orbit used to filter Palsar-2 images. Defaults to P2Orbit.ASCENDING.

    """
    download_func = (
        download_time_series if composite_method == CompositeMethod.TIMESERIES else download
    )
    download_func(
        data_dir=data_dir,
        bbox=bbox,
        satellite=Palsar2(),
        start_date=start_date,
        end_date=end_date,
        selected_bands=selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        filter_polygon=filter_polygon,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "dtype": dtype,
            "orbit": orbit,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )

download_nasadem(data_dir, bbox, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None)

Download NASADEM images. Images are written in several .tif chips to data_dir. Additionally, a file nasadem.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Polygon | None

More fine-grained AOI than bbox. Defaults to None.

None
Source code in src/geefetch/data/get.py
def download_nasadem(
    data_dir: Path,
    bbox: GeoBoundingBox,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Polygon | None = None,
) -> None:
    """Download NASADEM images. Images are written in several .tif chips
    to `data_dir`. Additionally, a file `nasadem.vrt` is written to combine all the chips.

    Parameters
    ----------
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Polygon | None
        More fine-grained AOI than `bbox`. Defaults to None.
    """
    if composite_method == CompositeMethod.TIMESERIES:
        raise ValueError("Time series is not relevant for DEM.")
    download(
        data_dir=data_dir,
        bbox=bbox,
        satellite=NASADEM(),
        start_date=None,
        end_date=None,
        selected_bands=selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        in_parallel=True,
        max_workers=3,
        filter_polygon=filter_polygon,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "dtype": dtype,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )

download_custom(satellite_custom, data_dir, bbox, start_date, end_date, selected_bands=None, crs=None, resolution=10, tile_shape=500, max_tile_size=10, composite_method=CompositeMethod.MEDIAN, dtype=DType.Float32, filter_polygon=None)

Download images from a custom data source. Images are written in several .tif chips to data_dir. Additionally, a file nasadem.vrt is written to combine all the chips.

Parameters:

Name Type Description Default
satellite_custom CustomSatellite
required
data_dir Path

Directory to write the downloaded files to.

required
bbox GeoBoundingBox

The box defining the region of interest.

required
start_date str | None

The start date of the time period of interest.

required
end_date str | None

The end date of the time period of interest.

required
selected_bands list[str] | None

The bands to download. If None, the default satellite bands are used.

None
crs CRS | None

The CRS in which to download data. If None, AOI is split in UTM zones and data is downloaded in their local UTM zones. Defaults to None.

None
resolution int

Resolution of the downloaded data, in meters. Defaults to 10.

10
tile_shape int

Side length of a downloaded chip, in pixels. Defaults to 500.

500
max_tile_size int

Parameter adjusting the memory consumption in Google Earth Engine, in Mb. Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.

10
composite_method CompositeMethod

The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to download data as a time series instead of turning it into a mosaic. Defaults to CompositeMethod.MEDIAN.

MEDIAN
dtype DType

The data type of the downloaded images. Defaults to DType.Float32.

Float32
filter_polygon Polygon | None

More fine-grained AOI than bbox. Defaults to None.

None
Source code in src/geefetch/data/get.py
def download_custom(
    satellite_custom: CustomSatellite,
    data_dir: Path,
    bbox: GeoBoundingBox,
    start_date: str | None,
    end_date: str | None,
    selected_bands: list[str] | None = None,
    crs: CRS | None = None,
    resolution: int = 10,
    tile_shape: int = 500,
    max_tile_size: int = 10,
    composite_method: CompositeMethod = CompositeMethod.MEDIAN,
    dtype: DType = DType.Float32,
    filter_polygon: shapely.Polygon | None = None,
) -> None:
    """Download images from a custom data source. Images are written in several .tif chips
    to `data_dir`. Additionally, a file `nasadem.vrt` is written to combine all the chips.

    Parameters
    ----------
    satellite_custom : CustomSatellite
    data_dir : Path
        Directory to write the downloaded files to.
    bbox : GeoBoundingBox
        The box defining the region of interest.
    start_date : str | None
        The start date of the time period of interest.
    end_date : str | None
        The end date of the time period of interest.
    selected_bands : list[str] | None
        The bands to download. If None, the default satellite bands are used.
    crs : CRS | None
        The CRS in which to download data. If None, AOI is split in UTM zones and
        data is downloaded in their local UTM zones. Defaults to None.
    resolution : int
        Resolution of the downloaded data, in meters. Defaults to 10.
    tile_shape : int
        Side length of a downloaded chip, in pixels. Defaults to 500.
    max_tile_size : int
        Parameter adjusting the memory consumption in Google Earth Engine, in Mb.
        Choose the highest possible that doesn't raise a User Memory Excess error. Defaults to 10.
    composite_method : CompositeMethod
        The composite method to mosaic the image collection. Can be CompositeMethod.TIMESERIES to
        download data as a time series instead of turning it into a mosaic.
        Defaults to CompositeMethod.MEDIAN.
    dtype : DType
        The data type of the downloaded images. Defaults to DType.Float32.
    filter_polygon : shapely.Polygon | None
        More fine-grained AOI than `bbox`. Defaults to None.
    """
    if composite_method == CompositeMethod.TIMESERIES:
        raise ValueError("Time series is not relevant for Custom Satellites.")
    download(
        data_dir=data_dir,
        bbox=bbox,
        satellite=satellite_custom,
        start_date=start_date,
        end_date=end_date,
        selected_bands=selected_bands,
        crs=crs,
        resolution=resolution,
        tile_shape=tile_shape,
        max_tile_size=max_tile_size,
        in_parallel=True,
        max_workers=3,
        filter_polygon=filter_polygon,
        satellite_get_kwargs={
            "composite_method": composite_method,
            "dtype": dtype,
        },
        satellite_download_kwargs={"dtype": dtype.to_str()},
    )