Hello,

I am trying to implement this, Sentinel-Hub example in CDSE. As far as I understand, I need to create a stats_request variable,

which I have done in the past for other use-cases.

I am not sure exactly how to integrate in the stats_request the below input arguments:

**time_interval** = time_interval, # must be same as in the evalscript
**other_args** = {‘dataFilter’:{‘previewMode’: ‘DETAIL’}} # because of `CLM`

and `CLP`

Also, I am not sure if I should include the following in the stats_request, or if this should be handled, solely in the declared evalscript.

“aggregation”: {

“timeRange”: {

“from”: “2019-10-01T00:00:00Z”,

“to”: “2020-09-30T00:00:00Z”

},

“aggregationInterval”: {

“of”: “P10D”

},

Many thanks,

Zacharias

Hi, the script you refer to is not designed for Statistical API and will not work with this API. For some specific examples for Statistical API, please refer to this page.

Thank you for the prompt reply,

I am aware of those examples, but have not managed to do what I wanted using them.

In the examples page you linked we have

- an evalscript part
- a stats_request,
- implementation of the request.

I guess a more specific question is :

Will I be able to use the interpolation evalscript in CDSE, as long as I change the rest of the parts to conform to the CDSE Statistical API structure?

Thanks

Can you please explain exactly what you are trying to achieve in your workflow? As I said the script is not suitable for Statistical API. If you can be clear with what the output from Statistical API is then I can start to help you.

Thank you William,

Not everything is defined yet, as I am in the experimentation phase here, but I will try to be as thorough as possible.

I have a shapefile of 2500 points. This is the input for testing purposes. In the final iteration the count of points could be tens of thousands. approx 50,000 to 100,000 to give an order of magnitude.

For each point are needed:

- The closest observation (single pixel) in the resolution of 20m.
- Sentinel-1 and Sentinel-2 timeseries, for the period of 1 year (or more).
- Observations in regular intervals, as this will be input in a ML model. These regular intervals could be in the range of 10,15 or 30 days.

My attempt here, and what is not very well defined yet, is exactly what kind of values we are extracting. I guess for a 30-day interval we would need min/max/median/percentiles/std. etc… For a more detailed timeseries (e.g. 10-day interval), these stats would not be so easy to compute, due to lack of observations, and we would need some form of interpolation, gap-filling.

I was trying to get as close to the raw values as is possible in CDSE, to investigate which solution of the two above, would better fit our needs.

Thank you for the clarification. I will proceed with the 30 day aggregation and see how it goes from there.