Closed JanssenBrm closed 10 months ago
@JanssenBrm I get the following error when attempting to run the UDP in a notebook:
OpenEoApiError: [400] ProcessParameterInvalid: The value passed for parameter 'mask' in process 'mask_polygon' is invalid: Unsupported mask type <class 'dict'> (ref: r-240110d98a214dc08c4ff31dc4fa5ffe)
it occurs after executing cell #16 (mogpr.execute_batch...) in the attached notebook (rename txt to ipynb)...
Any idea what the issue is? UDP_mogprfusion.ipynb.txt
Thank you for the feedback @patrick-griffiths. It seems that the issue is related to the way that the spatial extent input parameter is provided. The service is expecting a valid GeoJSON structure. The following code snippet should help in transforming the bbox to a valid GeoJSON feature.
# Convert bbox to GeoJSON
import geojson
from shapely.geometry import Polygon, mapping
spat_ext = geojson.Feature(geometry=Polygon(((minx,miny), (minx,maxy), (maxx,maxy), (maxx,miny))))
One of the requirements of the project is to create a dedicated UDP for merging S1 and S2 data. Although this is already supported through CropSAR, we can implement a similar UDP based on MOGPR. As shown in this notebook, MOGPR already supports multiple source input datacubes.
The goal of this new UDP is to implement a similar process in a single UDP where the user can select a S1 and S2 collection upon which the MOGPR service is applied.