Open jordancaraballo opened 7 months ago
In our workflow:
Authentication from the CLI:
# get credentials
credentials = ee.ServiceAccountCredentials(gee_account, gee_key)
ee.Initialize(credentials) # gd initialize does not take service account
print("Initialized")
Below are the documented steps from Matt, including links and steps. This should be documented somewhere so SRLite can be useful for someone that does not have a Matt to generate the CCDC files (or at least until we get it working with HLS).
I ran this from an ABR server and on GEE (we have a setup where GEE exports to google drive get automatically copied to our server).
First, I combined some information from Paul's TOA footprint gpkg and the NASA NGA inventory geodatabase, and calculated some extra fields including UTM zone. Result is saved to a shapefile that is then uploaded to GEE.
Then in GEE, I generate a CCDC model asset that covers the footprints of interest. I have one that covers all of Alaska, and three patches in Senegal. You can also calculate this CCDC on-the-fly for each footprint but it ends up being orders of magnitude slower. There should eventually be a precomputed global CCDC asset that you may be able to point to instead of generating it ourselves.
Then in GEE I extract modeled reflectance matching the footprint, date, and UTM zone of the TOA footprints. This is exported to google drive.
On the ABR server I fixed up the GEE exported geotiff (tagging the nodata value). Then I did some file management to organize the CCDC outputs into the expected folder structure.
The set then gets put into a tar.gz archive, copied to ADAPT, and unpacked.
Lastly I make it world readable on ADAPT.
The Rmd file includes links to the GEE script.
adapt_footprint_gpkg_to_ccdc_Senegal_20230309.Rmd.zip