Package: geedim
geedimSearch, composite, and downloadGoogle Earth Engineimagery, without size limits.Descriptiongeedimprovides a command line interface and API for searching, compositing and downloading satellite imagery
from Google Earth Engine (EE). It optionally performs cloud/shadow masking, and cloud/shadow-free compositing on
supported collections. Images and composites can be downloaded; or exported to Google Drive, Earth Engine asset or
Google Cloud Storage. Images larger than theEE size limitare split and downloaded
as separate tiles, then re-assembled into a single GeoTIFF.See the documentation site for more detail:https://geedim.readthedocs.io/.Cloud/shadow supportAny EE imagery can be searched, composited and downloaded bygeedim. Cloud/shadow masking, and cloud/shadow-free
compositing are supported on the following collections:EE nameDescriptionLANDSAT/LT04/C02/T1_L2Landsat 4, collection 2, tier 1, level 2 surface
reflectance.LANDSAT/LT05/C02/T1_L2Landsat 5, collection 2, tier 1, level 2 surface
reflectance.LANDSAT/LE07/C02/T1_L2Landsat 7, collection 2, tier 1, level 2 surface
reflectance.LANDSAT/LC08/C02/T1_L2Landsat 8, collection 2, tier 1, level 2 surface
reflectance.LANDSAT/LC09/C02/T1_L2Landsat 9, collection 2, tier 1, level 2 surface
reflectance.COPERNICUS/S2Sentinel-2, level 1C, top of atmosphere reflectance.COPERNICUS/S2_SRSentinel-2, level 2A, surface reflectance.COPERNICUS/S2_HARMONIZEDHarmonised Sentinel-2, level 1C, top of atmosphere
reflectance.COPERNICUS/S2_SR_HARMONIZEDHarmonised Sentinel-2, level 2A, surface reflectance.InstallationRequirementsgeedimis a python 3 package, and requires users to be registered withGoogle Earth
Engine.condaUnder Windows, usingcondais the easiest way to resolve binary dependencies. TheMinicondainstallation provides a minimalconda.condainstall-cconda-forgegeedimpippipinstallgeedimAuthenticationFollowing installation, Earth Engine should be authenticated:earthengineauthenticateGetting startedCommand line interfacegeedimcommand line functionality is accessed through the commands:search: Search for images.composite: Create a composite image.download: Download image(s).export: Export image(s).config: Configure cloud/shadow masking.Get help ongeedimwith:geedim--helpand help on ageedimcommand with:geedim<command>--helpExamplesSearch for Landsat-8 images, reporting cloudless portions.geedimsearch-cl8-c2-l2-s2021-06-01-e2021-07-01--bbox24-3324.1-33.1--cloudless-portionDownload a Landsat-8 image with cloud/shadow mask applied.geedimdownload-iLANDSAT/LC08/C02/T1_L2/LC08_172083_20210610--bbox24-3324.1-33.1--maskCommand pipelinesMultiplegeedimcommands can be chained together in a pipeline where image results from the previous command form
inputs to the current command. For example, if thecompositecommand is chained withdownloadcommand, the
created composite image will be downloaded, or if thesearchcommand is chained with thecompositecommand, the
search result images will be composited.Common command options are also piped between chained commands. For example, if theconfigcommand is chained with
other commands, the configuration specified withconfigwill be applied to subsequent commands in the pipeline. Many
command combinations are possible.ExamplesComposite two Landsat-7 images and download the result:geedimcomposite-iLANDSAT/LE07/C02/T1_L2/LE07_173083_20100203-iLANDSAT/LE07/C02/T1_L2/LE07_173083_20100219download--bbox22-33.122.1-33--crsEPSG:3857--scale30Composite the results of a Landsat-8 search and download the result.geedimsearch-cl8-c2-l2-s2019-02-01-e2019-03-01--bbox23-3323.2-33.2composite-cmq-mosaicdownload--scale30--crsEPSG:3857Composite the results of a Landsat-8 search, export to Earth Engine asset, and download the asset image.geedimsearch-cl8-c2-l2-s2019-02-01-e2019-03-01--bbox23-3323.2-33.2composite-cmq-mosaicexport--typeasset--folder<yourcloudproject>--scale30--crsEPSG:3857downloadSearch for Sentinel-2 SR images with a cloudless portion of at least 60%, using theqamask-method to identify
clouds:geedimconfig--mask-methodqasearch-cs2-sr--cloudless-portion60-s2022-01-01-e2022-01-14--bbox24-3424.5-33.5APIExampleimportgeedimasgdgd.Initialize()# initialise earth engine# geojson polygon to search / downloadregion={"type":"Polygon","coordinates":[[[24,-33.6],[24,-33.53],[23.93,-33.53],[23.93,-33.6],[24,-33.6]]]}# make collection and search, reporting cloudless portionscoll=gd.MaskedCollection.from_name('COPERNICUS/S2_SR')coll=coll.search('2019-01-10','2019-01-21',region,cloudless_portion=0)print(coll.schema_table)print(coll.properties_table)# create and download an imageim=gd.MaskedImage.from_id('COPERNICUS/S2_SR/20190115T080251_20190115T082230_T35HKC')im.download('s2_image.tif',region=region)# composite search results and downloadcomp_im=coll.composite()comp_im.download('s2_comp_image.tif',region=region,crs='EPSG:32735',scale=30)LicenseThis project is licensed under the terms of theApache-2.0 License.ContributingSee thedocumentationfor details.CreditsTiled downloading was inspired by the work inGEES2Downloaderunder
terms of theMIT license.Medoid compositing was adapted fromgee_toolsunder the terms of theMIT license.Sentinel-2 cloud/shadow masking was adapted fromee_extraunder
terms of theApache-2.0 license