edown is a Google Earth Engine downloader that discovers images for a location and time range, downloads each image in its native grid as GeoTIFF, and can optionally build Zarr stacks for grid-compatible groups.
- Searches an ImageCollection by date range and AOI.
- Preserves each image's native CRS and transform instead of forcing a common projection.
- Downloads intersecting chunks in parallel across multiple images.
- Writes a run manifest with discovery, download, and stack metadata.
- Builds Zarr outputs only when images share an alignment signature.
python -m pip install edownedown supports Python 3.9 through 3.14.
For local development:
python -m pip install -e ".[dev,stack,dask]"edown prefers Earth Engine service-account credentials when both of these environment variables are set:
GEE_SERVICE_ACCOUNTGEE_SERVICE_ACCOUNT_KEY
Otherwise it tries, in order:
- persistent Earth Engine user credentials
- Google application default credentials
If both user-auth and ADC refresh tokens are stale, reauthenticate before running downloads.
Search only:
edown search \
--collection-id COPERNICUS/S2_SR_HARMONIZED \
--start-date 2024-06-01 \
--end-date 2024-06-07 \
--bbox -0.15 51.48 0.02 51.56 \
--band B4 \
--band B8 \
--manifest-path manifests/search.jsonDownload native-grid GeoTIFFs:
edown download \
--collection-id COPERNICUS/S2_SR_HARMONIZED \
--start-date 2024-06-01 \
--end-date 2024-06-07 \
--geojson docs/examples/aoi.geojson \
--band B4 \
--band B8 \
--output-root ./dataBuild Zarr stacks from compatible groups:
edown stack \
--manifest-path manifests/run.json \
--output-root ./dataRun the bundled end-to-end Sentinel-2 example:
python examples/s2_find_download_stack.py --output-root ./data/live-s2from pathlib import Path
from edown import AOI, DownloadConfig, download_images
config = DownloadConfig(
collection_id="COPERNICUS/S2_SR_HARMONIZED",
start_date="2024-06-01",
end_date="2024-06-07",
aoi=AOI.from_bbox((-0.15, 51.48, 0.02, 51.56)),
bands=("B4", "B8"),
output_root=Path("data"),
)
summary = download_images(config)
print(summary.manifest_path)The default test suite is mocked and offline. For a real end-to-end Sentinel-2 smoke test, install the stack extras:
python -m pip install -e ".[dev,stack]"Then run:
export EDOWN_RUN_LIVE_TESTS=1
python -m pytest -s tests/test_live_s2.pyDefault live settings:
- collection:
COPERNICUS/S2_SR_HARMONIZED - dates:
2024-06-01through2024-06-03 - bbox:
-0.1278,51.5072,-0.1270,51.5078 - bands:
B4,B8
You can override them with:
EDOWN_LIVE_COLLECTION_IDEDOWN_LIVE_START_DATEEDOWN_LIVE_END_DATEEDOWN_LIVE_BBOXEDOWN_LIVE_BANDS
This requires valid Earth Engine authentication, via either:
GEE_SERVICE_ACCOUNTandGEE_SERVICE_ACCOUNT_KEY(path to a service-account JSON key file)- existing local Earth Engine credentials
- valid Google application default credentials
--chunk-sizeis only used as an exact size when--chunk-size-mode fixedis set.- In the default
automode,edownestimates chunk sizes per image from the AOI window and request byte limits.
python -m pytestruff check .mypy srcpython -m build
Docs are built with MkDocs Material and published to GitHub Pages from GitHub Actions.