Skip to content

CLI Configuration

GeeFetch uses a YAML-based configuration system to specify download parameters. This page documents all available configuration options.

Common Configuration Schema

This is configuration that you specify once in the default_satellite section, and that will be merge to all satellite-specific configurations.

geefetch.cli.omegaconfig

SatelliteDefaultConfig dataclass

The structured type for a GeeFetch default satellite configuration

Attributes:

Name Type Description
aoi AOIConfig

The temporal/spatial Area of Interest

gee GEEConfig

Google Earth Engine specific configurationss

tile_size int

The pixel side length for downloaded images

resolution int

The resolution for downloaded images, in meters

dtype DType

The data type for downloaded images. Can be used to reduce file size and download speed at the cost of some loss of precision.

composite_method CompositeMethod

The mosaicking method. Use CompositeMethod.TIMESERIES to download time series instead of mosaicks. Defaults to CompositeMethod.MEDIAN.

selected_bands list[str] | None

The bands to download. If None, will use the satellite default bands. Defaults to None.

GEEConfig dataclass

Configuration of Google Earth Engine.

Attributes:

Name Type Description
ee_project_id str

Your GEE id, to connect to the API.

.. see also:: https://developers.google.com/earth-engine/apidocs/ee-initialize

max_tile_size int

Size constraint in MB for the request sent to GEE. This is heuristical and depends in general on what satellite you are interested in. Decrease if User Memory Excess Error, but choose highest possible otherwise. Defaults is 10.

AOIConfig dataclass

Configuration of a spatial/temporal Area of Interest (AOI).

Attributes:

Name Type Description
spatial SpatialAOIConfig
temporal TemporalAOIConfig | None
country str | list[str] | None

The name of one or more countries. If given, spatial AOI is further restricted to its area that intersects one of the country boundaries. Defaults to None.

.. note:: See https://www.naturalearthdata.com/downloads/110m-cultural-vectors/ for possible values

TemporalAOIConfig dataclass

Configuration of the temporal range of interest.

Attributes:

Name Type Description
start_date str

Start date in 'YYYY-MM-DD' format.

end_date str

End date in 'YYYY-MM-DD' format.

SpatialAOIConfig dataclass

Configuration of the spatial area of interest.

Attributes:

Name Type Description
left float
right float
top float
bottom float
epsg int

EPSG code for the CRS in which the boundaries are given. If given, the downloaded data will be expressed in that same CRS. Defaults is 4326, corresponding to WGS84 (latitude, longitude).

Satellite specific options

GediConfig dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring GEDI.

Attributes:

Name Type Description
format Format

Filetype for downloading vector GEDI. Defaults to Format.PARQUET

S1Config dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring Sentinel-1.

Attributes:

Name Type Description
orbit S1Orbit

Orbit direction to filter Sentinel-1 acquisitions. Can be ASCENDING, DESCENDING, BOTH, or AS_BANDS to download ascending and descending composites as separate bands. Defaults to BOTH.

S2Config dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring Sentinel-2.

Attributes:

Name Type Description
cloudless_portion int

Threshold for the portion of filled pixels that must be cloud/shadow free (%). Images that do not fullfill the requirement are filtered out before mosaicking. Default is 40.

cloud_prb_threshold int

Threshold for cloud probability above which a pixel is filtered out (%). Default is 40.

DynWorldConfig dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring Dynamic World.

Landsat8Config dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring Landsat 8.

Palsar2Config dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring Palsar 2.

Attributes:

Name Type Description
orbit P2Orbit

Orbit direction to filter PALSAR-2 acquisitions. Can be ASCENDING or DESCENDING. Defaults to DESCENDING.

NASADEMConfig dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring NASADEM.

CustomSatelliteConfig dataclass

Bases: SatelliteDefaultConfig

The structured type for configuring a custom GEE dataset source.

Geefetch configuration

Tying it all together, the configuration for the geefetch application looks like this.

GeefetchConfig dataclass

The structured type for a GeeFetch configuration.

Attributes:

Name Type Description
data_dir Path

The path to store downloaded data.

satellite_default SatelliteDefaultConfig

Default satellite configuration.

gedi GediConfig

GEDI specific configuration / variation to the default.

s1 S1Config

Sentinel-1 specific configuration / variation to the default.

s2 S2Config

Sentinel-2 specific configuration / variation to the default.

dynworld DynWorldConfig

Dynamic world specific configuration / variation to the default.

landsat8 Landsat8Config

Landsat 8 specific configuration / variation to the default.

palsar2 Palsar2Config

Palsar 2 specific configuration / variation to the default.

nasadem NASADEMConfig

NASA-DEM specific configuration / variation to the default.

customs dict[str, CustomSatelliteConfig]

Configuration for a specific dataset sources unsupported natively by geefetch.

load(path)

Loads and validates a geefetch configuration from a YAML file or directory.

If a directory is provided, all .yaml files within it are merged. The function then injects missing satellite configurations with defaults.

Parameters:

Name Type Description Default
path Path

Path to a YAML file or a directory containing YAML files to load.

required

Returns:

Type Description
GeefetchConfig

The fully merged and validated configuration object.