-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save_asset_per_band: assets in different s3 folders + band-specific filename #877
Save_asset_per_band: assets in different s3 folders + band-specific filename #877
Comments
@JeroenVerstraelen to plan in next sprint |
Related to Open-EO/openeo-geotrellis-extensions#317 in that this also accepts a dictionary mapping band names to scale, offset etc. |
@JorisCod , do you have and example process graph that will need this treatment? |
Jod id: 241004c6b52a4745b1280a94d7b9e257 putting in this code:
|
Actually, the job above failed, though unclear to me why (the online web editor is crashing for me, maybe too many jobs). |
Would it be ok to use bands names in the format of: Then we can support " |
One problem with this solution is that the resulting tiff will always contain a band with the full path as bandname, which I think will need to be included in the resulting stac collection to load in these bands and in turn produce a lengthy and confusing load_stac if someone wants to use the results. |
Would it be fine to only work without temporal dimension? dc = connection.load_collection(
"SENTINEL2_L2A",
spatial_extent=spatial_extent_tap,
temporal_extent=["2023-06-01", "2023-06-05"],
bands=['B04', "SCL"],
)
dc = dc.reduce_dimension("t", openeo.processes.first)
dc = dc.save_result(format="GTiff", options={
"separate_asset_per_band": True,
"filepath_per_band": ["test/2023_B04.tiff", "test2/classification.tiff"],
})
When there is a temporal dimension, the date should be included in the filename, and then we need some kind of template system |
Feel free to adapt/rename/improve the "bands_metadata" format option (a dictionary of band names to tiff tags). |
…rectory. path.absolute() is good enough. #877
The goal of this issue is to save assets to different folders, each with a specific name according to the band name.
Specific use case in mind: saving of monthly composites in different s3 folders (one folder/month)
Prefix example:
vito/products/2020/'<MONTH'>/
Filename example:
LCFM_LSF-MONTHLY_<DATE_START>_<DATE_END>29TNE_V001-SATIO_B<BAND_NAME>M.tif
So what's parametric is month, band_name, resolution, date_start and date_end. Resolution can be considered fixed (*). Month and band_name can be derived as follows:
band_name = openeo_band_name.split('')[-1]
month = openeo_band_name.split('')[0]
(alternatively with fixed indices).
date_start and date_end are harder as they are to be derived from month:
The solution might be to provide a list of prefixes and filenames to use, both lists having the same length as the number of bands. This is quite general as well as flexible.
'* An ideal workflow is to have 1 job for all resolutions. This is actually the goal of main workflow of LCFM, to have a workflow for both 10m and 20m bands.
The text was updated successfully, but these errors were encountered: