Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
404 changes: 21 additions & 383 deletions notebooks/OpenEO/FuseTS - CropSAR Full Workflow.ipynb

Large diffs are not rendered by default.

442 changes: 46 additions & 396 deletions notebooks/OpenEO/FuseTS - MOGPR Full Workflow.ipynb

Large diffs are not rendered by default.

513 changes: 76 additions & 437 deletions notebooks/OpenEO/FuseTS - MOGPR Multi Source Fusion.ipynb

Large diffs are not rendered by default.

471 changes: 57 additions & 414 deletions notebooks/OpenEO/FuseTS - MOGPR S1 and S2.ipynb

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions src/fusets/openeo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,18 @@ def load_xarray(collection_id, spatial_extent, temporal_extent, properties=None,
if openeo_connection == None:
openeo_connection = openeo.connect("openeo.cloud").authenticate_oidc()
print(spatial_extent)
scl = openeo_connection.load_collection(
collection_id, temporal_extent=temporal_extent, bands=["SCL"]
).filter_bbox(spatial_extent)
scl = openeo_connection.load_collection(collection_id, temporal_extent=temporal_extent, bands=["SCL"]).filter_bbox(
spatial_extent
)
cloud_mask = scl.process(
"to_scl_dilation_mask",
data=scl,
kernel1_size=17, kernel2_size=77,
kernel1_size=17,
kernel2_size=77,
mask1_values=[2, 4, 5, 6, 7],
mask2_values=[3, 8, 9, 10, 11],
erosion_kernel_size=3)
erosion_kernel_size=3,
)
data = openeo_connection.load_collection(
collection_id, temporal_extent=temporal_extent, bands=["B02", "B03", "B04"]
).filter_bbox(spatial_extent)
Expand Down
10 changes: 5 additions & 5 deletions src/fusets/openeo/services/publish_mogpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ def execute_udf():
temp_ext = ["2023-01-01", "2023-03-31"]

# Setup NDVI cube
scl = connection.load_collection(
"SENTINEL2_L2A", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["SCL"]
)
scl = connection.load_collection("SENTINEL2_L2A", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["SCL"])
cloud_mask = scl.process(
"to_scl_dilation_mask",
data=scl,
kernel1_size=17, kernel2_size=77,
kernel1_size=17,
kernel2_size=77,
mask1_values=[2, 4, 5, 6, 7],
mask2_values=[3, 8, 9, 10, 11],
erosion_kernel_size=3)
erosion_kernel_size=3,
)
base_s2 = connection.load_collection(
"SENTINEL2_L2A", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["B04", "B08"]
)
Expand Down
16 changes: 9 additions & 7 deletions src/fusets/openeo/services/publish_mogpr_s1_s2.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ def _load_ndvi(connection, polygon, date):
:param date:
:return:
"""
scl = connection.load_collection(
"SENTINEL2_L2A", spatial_extent=polygon, temporal_extent=date, bands=["SCL"]
)
scl = connection.load_collection("SENTINEL2_L2A", spatial_extent=polygon, temporal_extent=date, bands=["SCL"])
cloud_mask = scl.process(
"to_scl_dilation_mask",
data=scl,
kernel1_size=17, kernel2_size=77,
kernel1_size=17,
kernel2_size=77,
mask1_values=[2, 4, 5, 6, 7],
mask2_values=[3, 8, 9, 10, 11],
erosion_kernel_size=3)
erosion_kernel_size=3,
)
base_s2 = connection.load_collection(
"SENTINEL2_L2A", spatial_extent=polygon, temporal_extent=date, bands=["B04", "B08"]
)
Expand Down Expand Up @@ -201,10 +201,12 @@ def _load_evi(connection, polygon, date):
cloud_mask = scl.process(
"to_scl_dilation_mask",
data=scl,
kernel1_size=17, kernel2_size=77,
kernel1_size=17,
kernel2_size=77,
mask1_values=[2, 4, 5, 6, 7],
mask2_values=[3, 8, 9, 10, 11],
erosion_kernel_size=3)
erosion_kernel_size=3,
)
base_s2 = connection.load_collection(
collection_id="SENTINEL2_L2A",
spatial_extent=polygon,
Expand Down
6 changes: 4 additions & 2 deletions src/fusets/openeo/services/publish_phenology.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ def test_udf():
cloud_mask = scl.process(
"to_scl_dilation_mask",
data=scl,
kernel1_size=17, kernel2_size=77,
kernel1_size=17,
kernel2_size=77,
mask1_values=[2, 4, 5, 6, 7],
mask2_values=[3, 8, 9, 10, 11],
erosion_kernel_size=3)
erosion_kernel_size=3,
)
base = connection.load_collection(
"SENTINEL2_L2A_SENTINELHUB", spatial_extent=spat_ext, temporal_extent=temp_ext, bands=["B04", "B08"]
)
Expand Down
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ def wetland_sentinel2_ndvi(areas):
cloud_mask = scl.process(
"to_scl_dilation_mask",
data=scl,
kernel1_size=17, kernel2_size=77,
kernel1_size=17,
kernel2_size=77,
mask1_values=[2, 4, 5, 6, 7],
mask2_values=[3, 8, 9, 10, 11],
erosion_kernel_size=3)
erosion_kernel_size=3,
)
data = openeo_connection.load_collection(
"SENTINEL2_L2A", temporal_extent=("2020-01-01", "2021-01-01"), bands=["B08", "B04"]
).filter_bbox(areas["wetland"])
Expand Down
6 changes: 4 additions & 2 deletions tests/fusets_openeo_tests/test_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ def start_job(data, context: dict, **kwargs) -> openeo.BatchJob:
cloud_mask = scl.process(
"to_scl_dilation_mask",
data=scl,
kernel1_size=17, kernel2_size=77,
kernel1_size=17,
kernel2_size=77,
mask1_values=[2, 4, 5, 6, 7],
mask2_values=[3, 8, 9, 10, 11],
erosion_kernel_size=3)
erosion_kernel_size=3,
)
base = connection.load_collection(
"SENTINEL2_L2A",
spatial_extent=aoi,
Expand Down
Loading
Loading