Command line

geedim

Search, composite and export Google Earth Engine imagery.

Usage

geedim [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

Options

-v, --verbose

Increase verbosity.

-q, --quiet

Decrease verbosity.

--version

Show the version and exit.

Commands

composite

Create a composite image.

config

Configure cloud masking.

download

Export image(s) to GeoTIFF file(s).

export

Export image(s) to Google cloud platforms.

search

Search a collection for images.

geedim config

Configure cloud masking.

Masking configuration is piped out of this command and used by subsequent pipeline commands that require it.

Usage

geedim config [OPTIONS]

Options

-mc, --mask-cirrus, -nmc, --no-mask-cirrus

Whether to mask cirrus clouds. Valid for Landsat 8-9 images and for Sentinel-2 images with the ‘qa’ --mask-method.

Default:

True

-ms, --mask-shadows, -nms, --no-mask-shadows

Whether to mask cloud shadows. Valid for Landsat images and for Sentinel-2 images with the ‘qa’ or ‘cloud-prob’ --mask-method.

Default:

True

-mst, --mask-saturation, -nmst, --no-mask-saturation

Whether to mask saturation. Valid for Landsat images.

Default:

False

-mnp, --mask-nonphysical, -nmnp, --no-mask-nonphysical

Whether to mask reflectance outside the 0-1 range. Valid for Landsat surface reflectance images and Sentinel-2 images.

Default:

False

-ma, --mask-aerosols, -nma, --no-mask-aerosols

Whether to mask high aerosol levels. Valid for Landsat 8-9 surface reflectance images.

Default:

False

-mm, --mask-method <mask_method>

Method used to mask clouds. Valid for Sentinel-2 images.

Default:

cloud-score

Options:

cloud-prob | qa | cloud-score

-p, --prob <prob>

Cloud Probability threshold (%). Valid for Sentinel-2 images with the ‘cloud-prob’ --mask-method.

Default:

60

-d, --dark <dark>

NIR reflectance threshold for shadow masking. NIR values below this threshold are potential cloud shadows. Valid for Sentinel-2 images with the ‘qa’ or ‘cloud-prob’ --mask-method.

Default:

0.15

-sd, --shadow-dist <shadow_dist>

Maximum distance (m) to look for cloud shadows from cloud edges. Valid for Sentinel-2 images with the ‘qa’ or ‘cloud-prob’ --mask-method.

Default:

1000

-b, --buffer <buffer>

Distance (m) to dilate cloud. Valid for Sentinel-2 images with the ‘qa’ or ‘cloud-prob’ --mask-method.

Default:

50

-cdi, --cdi-thresh <cdi_thresh>

Cloud Displacement Index (CDI) threshold. Values below this threshold are considered potential cloud. Valid for Sentinel-2 images with the ‘qa’ or ‘cloud-prob’ --mask-method. By default, the CDI is not used.

-mcd, --max-cloud-dist <max_cloud_dist>

Maximum distance (m) to look for clouds. Used to form the cloud distance band for the ‘q-mosaic’ compositing --method.

Default:

5000

-s, --score <score>

Cloud Score+ threshold. Valid for Sentinel-2 images with the ‘cloud-score’ --mask-method.

Default:

0.6

-cb, --cs-band <cs_band>

Cloud Score+ band to threshold. Valid for Sentinel-2 images with the ‘cloud-score’ --mask-method.

Default:

cs

Options:

cs | cs_cdf

geedim download

Export image(s) to GeoTIFF file(s).

Images piped from previous commands will be exported, in addition to any images specified with --id. Input images are piped out of this command for use by subsequent commands.

Exported images include mask and related bands.

Images are retrieved as separate tiles which are downloaded and decompressed concurrently. Tile size can be controlled with --max-tile-size, --max-tile-dim and --max-tile-bands, and download / decompress concurrency with --max-requests and --max-cpus.

Files are named with the Earth Engine index of their source image, and file band descriptions set to image band names with --split ‘images’. Otherwise, files are named with their band name, and file band descriptions set to the Earth Engine index of the band’s source image with --split ‘bands’.

Usage

geedim download [OPTIONS]

Options

-i, --id <image_ids>

Earth Engine ID(s) of image(s) to export.

-c, --crs <crs>

CRS of the export image(s) as a well known authority (e.g. EPSG) or WKT string, path / URI of text file containing a string, or path / URI of an image with metadata CRS.

Default:

'auto'

-b, --bbox <LEFT BOTTOM RIGHT TOP>

WGS84 geographic coordinates of the export bounds.

Default:

'auto'

-r, --region <region>

Path / URI of a GeoJSON or georeferenced image file defining the export bounds. Use ‘-’ to read from previous --bbox / --region options in the pipeline.

Default:

'auto'

-buf, --buffer <buffer>

Distance (m) to buffer --bbox / --region with.

-s, --scale <scale>

Pixel scale of the export image(s) (m).

-ct, --crs-transform <XSCALE XSHEAR XTRANSLATION YSHEAR YSCALE YTRANSLATION>

Georeferencing transform of the export image(s).

Default:

'auto'

-sh, --shape <HEIGHT WIDTH>

Dimensions of the export image(s) (pixels).

Default:

'auto'

-l, --like <like>

Path / URI of a georeferenced image file defining --crs, --crs-transform & --shape.

-dt, --dtype <dtype>

Data type of the export image(s).

Default:

'auto'

Options:

uint8 | uint16 | uint32 | int8 | int16 | int32 | float32 | float64

-bn, --band-name <bands>

Band name(s) to export.

Default:

'all bands'

-m, --mask, -nm, --no-mask

Whether to mask cloud in the export image(s). Has no effect if cloud masking is not supported.

Default:

False

-rs, --resampling <resampling>

Resampling method to use when reprojecting.

Default:

near

Options:

near | bilinear | bicubic | average

-so, --scale-offset, -nso, --no-scale-offset

Whether to apply any STAC scales and offsets to the export image(s) (e.g. to convert digital numbers to physical units).

Default:

False

-sp, --split <split>

Whether to export an image file for each input image, or for each band of the input image(s).

Default:

images

Options:

bands | images

-n, --nodata, -nn, --no-nodata

Set the nodata tag of downloaded file(s) to the --dtype dependent value provided by Earth Engine (--nodata), or leave it unset (--no-nodata).

Default:

True

-dv, --driver <driver>

Format driver for the downloaded file(s).

Default:

gtiff

Options:

gtiff | cog

-mts, --max-tile-size <max_tile_size>

Maximum tile size (MB).

Default:

4

-mtd, --max-tile-dim <max_tile_dim>

Maximum tile width / height (pixels).

Default:

10000

-mtb, --max-tile-bands <max_tile_bands>

Maximum number of tile bands.

Default:

1024

-mr, --max-requests <max_requests>

Maximum concurrent tile downloads.

Default:

32

-mc, --max-cpus <max_cpus>

Maximum number of tiles to decompress concurrently.

Default:

'auto'

-dd, --download-dir <download_dir>

Path / URI of the download directory.

Default:

'current working'

-o, --overwrite

Overwrite destination file(s) if they exist.

geedim export

Export image(s) to Google cloud platforms.

Images piped from previous commands will be exported, in addition to any images specified with --id. Input images are piped out of this command for use by subsequent commands.

Exported images include mask and related bands.

Files are named with the Earth Engine index of their source image, and file band descriptions set to image band names with --split ‘images’. Otherwise, files are named with their band name, and file band descriptions set to the Earth Engine index of the band’s source image with --split ‘bands’.

Usage

geedim export [OPTIONS]

Options

-i, --id <image_ids>

Earth Engine ID(s) of image(s) to export.

-t, --type <type>

Export type.

Default:

'drive'

Options:

drive | asset | cloud

-f, -df, --folder, --drive-folder <folder>

Google Drive folder, Earth Engine asset project, or Google Cloud Storage bucket to export image(s) to. Can include sub-folders or an image collection name. Interpretation based on --type.

-c, --crs <crs>

CRS of the export image(s) as a well known authority (e.g. EPSG) or WKT string, path / URI of text file containing a string, or path / URI of an image with metadata CRS.

Default:

'auto'

-b, --bbox <LEFT BOTTOM RIGHT TOP>

WGS84 geographic coordinates of the export bounds.

Default:

'auto'

-r, --region <region>

Path / URI of a GeoJSON or georeferenced image file defining the export bounds. Use ‘-’ to read from previous --bbox / --region options in the pipeline.

Default:

'auto'

-buf, --buffer <buffer>

Distance (m) to buffer --bbox / --region with.

-s, --scale <scale>

Pixel scale of the export image(s) (m).

-ct, --crs-transform <XSCALE XSHEAR XTRANSLATION YSHEAR YSCALE YTRANSLATION>

Georeferencing transform of the export image(s).

Default:

'auto'

-sh, --shape <HEIGHT WIDTH>

Dimensions of the export image(s) (pixels).

Default:

'auto'

-l, --like <like>

Path / URI of a georeferenced image file defining --crs, --crs-transform & --shape.

-dt, --dtype <dtype>

Data type of the export image(s).

Default:

'auto'

Options:

uint8 | uint16 | uint32 | int8 | int16 | int32 | float32 | float64

-bn, --band-name <bands>

Band name(s) to export.

Default:

'all bands'

-m, --mask, -nm, --no-mask

Whether to mask cloud in the export image(s). Has no effect if cloud masking is not supported.

Default:

False

-rs, --resampling <resampling>

Resampling method to use when reprojecting.

Default:

near

Options:

near | bilinear | bicubic | average

-so, --scale-offset, -nso, --no-scale-offset

Whether to apply any STAC scales and offsets to the export image(s) (e.g. to convert digital numbers to physical units).

Default:

False

-sp, --split <split>

Whether to export an image file for each input image, or for each band of the input image(s).

Default:

images

Options:

bands | images

-w, --wait, -nw, --no-wait

Whether to wait for the export to complete.

Default:

True

geedim composite

Create a composite image.

Images piped from previous commands are used to create the composite, in addition to any images specified with --id. The composite image is piped out of this command for use by subsequent commands.

When supported, input images are cloud masked by default. This can be turned off with --no-mask. The ‘q-mosaic’ --method uses distance to the nearest cloud as the quality measure and requires cloud mask support.

Images are sorted by their capture date when --date and --bbox / --region are not provided.

Usage

geedim composite [OPTIONS]

Options

-i, --id <image_ids>

Earth Engine ID(s) of the component image(s).

-cm, --method <method>

Compositing method.

Default:

"'q-mosaic' for cloud mask supported collections, 'mosaic' otherwise."

Options:

q-mosaic | mosaic | medoid | median | mode | mean

-m, --mask, -nm, --no-mask

Whether to mask cloud in component images. Has no effect if cloud masking is not supported.

Default:

True

-rs, --resampling <resampling>

Resampling method for component images.

Default:

near

Options:

near | bilinear | bicubic | average

-d, --date <date>

Sort component images by the absolute difference of capture date and this date (UTC).

-b, --bbox <LEFT BOTTOM RIGHT TOP>

Sort component images by their cloud-free / filled portion inside these bounds.

-r, --region <region>

Sort component images by their cloud-free / filled portion inside the bounds defined by this GeoJSON / georeferenced image file. Use ‘-’ to read from previous --bbox / --region options in the pipeline.