eo_forge.utils
Helper utilities to download, calibrate, and extract patches from raw data.
Downloader module
|
Downloader Sentinel or Landasat data from a Google Cloud bucket. |
|
Google cloud definitions and path generators. |
|
Threaded Url download. |
|
Base class to download images. |
Landsat helper functions
|
purpouse: to read cloud image level from landsat metadata file |
|
Calibrate Landsat BQA band. |
|
Calibrate landsat5 l1 images to top of atmosphere radiance (default) or reflectance (if reflectance=True). |
|
Calibrate landsat8 l1 images to top of atmosphere radiance (default) or reflectance (if reflectance=True). |
Sentinel2 helper functions
|
Calibrate Sentinel 2. |
|
Get granule id and image base for a sentinel2 L1C image. |
|
Get granule id and image id from sentinel2 l1c products. |
|
Get clouds from metadata file "MTD_MSIL1C.xml". |
Helper functions for raster datasets
|
Clip raster to provided BBox. |
|
Reproject raster to a new bbox. |
|
Reproject raster north-south if needed. |
|
Check if resampling is required. |
|
Return a the raster's bounding box polygon. |
|
Resample a raster dataset by multiplying the pixel size by the scale factor, and update the dataset shape. |
|
Create a rasterio.MemoryFile instance. |
|
|
|
Check band crs match to provided bbox |
|
Check raster shape match. |
|
Get nodata_mask from raster by filtering values. |
|
Apply nodata_mask to raster. |
|
Apply_isvalid_mask to raster |
|
Get is_valid_mask from raster by filtering values. |
|
get raster data and profile Parameters ---------- raster: raster instance (rasterio open) |
|
Set shapes to raster. |
Helper functions for Bounding boxs
|
Set buffer and simplify (convexhull) geometry. |
General helper functions
|
|
|
Get dir and files from a target_path. |