User Manual
In this manual the general functionality of EODIE is described. In the end you can also find a usage example Examples (no external data needed). For more examples with explanations, please check out Tutorial.
Inputs
The following sections describe EODIEs command line arguments and the configuration files. All of the following only matters when using EODIE as command line tool.
Command line arguments
The following parameters and flags can be used in the commandline (more information on each parameter and flag below):
python eodie_process.py --platform <> (--rasterdir <> / --rasterfile <> / --use_zarr) --download_files --vector <> --out <> --id <> --gpkg_layer <> --epsg_for_csv <> --statistics_out --geotiff_out --array_out --database_out --statistics <> --index <> --start <> --end <> --tiles <> --tifbands <> --nc_vars <> --nc_coords <> --epsg_for_nc <> --exclude_border --external_cloudmask <> --no_cloudmask --maxcloudcover <> --resampling_method <> --delete_invalid_geometries --point_geoms --verbose --test --delayed_chunk_size <> --nodata <> --epsg_for_output <> --redownload --db_indices <>
Note that some parameters have options, some have defaults and some are optional, all flags are optional. See Necessary inputs for inputs that need to be given.
--platform--rasterdir--rasterfile--rasterfile instead of --rasterdir. Cannot be used together with --rasterdir.--use_zarrs--rasterdir or rasterfile.--download_files--rasterdir.--vector--out./results--id--vector.--id id--gpkg_layer--epsg_for_csv--statistics_out--geotiff_out--array_out--database_out--statisticscount (always included)--statistics sum median percentile_10 percentile_90--index--index ndvi evi2 B04 B8A--start20160101--end--tiles--tifbands--nc_vars--nc_coords--nc_vars. First possible time dimension, then latitude and longitude--nc_coords time lat lon--epsg_for_nc--delete_invalid_geometries--exclude_border--external_cloudmask--no_cloudmask--verbose--test--maxcloudcover--resampling_methodresampling_method: 'bilinear' will use bilinear resampling for all necessary resampling of the rasterdata--delayed_chunk_size--nodata--point_geoms--statistics is overwritten with single value field and only csv and database outputs are produced.epsg_for_output--redownload--download_files is set.--db_indices--db_indices id id,dateConfiguration files
[TODO: image of Sentinel-2 tiles over Finland]
EODIE includes platform-specific configuration files called config_x.yml with x being some satellite platform name, tif or nc. Generally, these configuration files do not need to be touched or changed, but there are few exceptions. These are:
If a ‘red edge’ band should be used in indices instead of the nir band, that could be changed in the platform specific configuration files. See more about this and about the possibility of extending EODIE to work with other platforms in ref:platform_spec.
If you wish to change the pixelsize for the outputs (for geotiffs and arrays), the value can be changed in these configuration files. Only available for s2 and ls8.
For downloading Landsat-8 images from Microsoft Planetary Computer, file config_ls8.yml includes a list of landsat assets to download. The default option includes surface reflectance bands (B01-B07) and metadata files.
pixelsizepixelsize: 10 will use bands that are available in 10 m as is and resample bands that are only available in larger pixelsizes to 10m before extracting statistics/array/geotifflandsat_assetslandsatassets:
- ang # ANG.txt
- mtl.txt # MTL.txt
- mtl.xml # MTL.xml
- qa_pixel # QA_PIXEL.TIF
- qa_radsat # QA_RADSAT.TIF
- qa_aerosol # SR_QA_AEROSOL.TIF
- coastal # SR_B1.TIF
- blue # SR_B2.TIF
- green # SR_B3.TIF
- red # SR_B4.TIF
- nir08 # SR_B5.TIF
- swir16 # SR_B6.TIF
- swir22 # SR_B7.TIFEnvironment variables
In order to automatically download Sentinel-2 imagery from Copernicus Data Space Ecosystem (CDSE), EODIE needs to have access to your CDSE credentials. These credentials should be stored as environment variables.
CDSE_USERNAME='your_username'
CDSE_PASSWORD='your_password'
Necessary inputs
--platform --rasterdir/--rasterfile --vector --out --id and at least one of --statistics_out/--geotiff_out/--array_out/--database_out--index also needs to be given, unless --platform tif--platform nc, --nc_vars, nc_coords and epsg_for_nc need to be givenOutputs
A logfile: rasterdir_YYYY-MM-DD.log if –rasterdir was given; rasterfile_YYYY-MM-DD_HH-mm-ss if –rasterfile was given.
--statistics_outOne csv per tile, band/vegetation index and date with polygon identifiers in the first column and statistics is the following columns.
--array_outOne pickeled numpy array per tile, band/vegetation and date with all polygons
--geotiff_outOne geotiff with georeferenced raster per tile, band/vegetation index and polygon
--database_outOne SQLite3 database file (.db) that contains results for given indices or bands in tables. Structurally content is similar to statistics.
Usage of external cloudmask
If a cloudmask for each file to be processed is available from an external source, make sure the cloudmask fulfills the following requirements:
date (YYYYMMDD, eg 20210603) and tilename (NNCCC , eg 34VFN) in end of filenames: xxx_date_tile.xx
supported raster file format (.tif, .jp2, and other formats supported by rasterio)
binary rastervalues (1,0; with 1 representing clouds/invalid pixels)
pixelsize == output pixelsize (given in config_x.yml)
The latter two criteria can be achieved by using the auxiliary script create_binary_cloudmask.py (but be aware of issue https://gitlab.com/eetun-tiimi/EODIE/-/issues/62)