PondiB / openeocubes

A lightweight R-based RESTful service to analyze Earth Observation data cubes in the cloud.
Apache License 2.0
30 stars 9 forks source link

Evi process added #84

Closed kwundram2602 closed 8 months ago

kwundram2602 commented 8 months ago

I added an evi process. I followed the equation on https://custom-scripts.sentinel-hub.com/custom-scripts/sentinel-2/evi/

kwundram2602 commented 8 months ago

When I tested the function I got this result: @PondiB. But I did not do any further tests. EVI calculated .... { "band_names": [ "EVI" ], "cube_type": "apply_pixel", "expr": [ "2.5((b08-b04)/(b08+6b06-7.5*b02)+1)" ], "in_cube": { "chunk_size": [ 1, 320, 320 ], "cube_type": "image_collection", "file": "C:\Users\kjell\AppData\Local\Temp\RtmpGKKcLu\file55284a376744.sqlite", "view": { "aggregation": "median", "resampling": "average", "space": { "bottom": 6788888.0500000007, "left": 840173.14999999991, "nx": 427, "ny": 361, "right": 852983.14999999991, "srs": "EPSG:3857", "top": 6799718.0500000007 }, "time": { "dt": "P15D", "t0": "2022-01-01", "t1": "2023-01-10" } } }, "keep_bands": false }

PondiB commented 8 months ago

"2.5*((b08-b04)/(b08+6_b06-7.5_b02)+1)"

Cool @kwundram2602 , then you can make a slight modification on the brackets so that this output should be : "2.5(b08-b04)/(b08+6b06-7.5b02)+1)" as it seems the formula is being messed up as these "%s follow each other" one solution might be more bracketing of such scenarios i.e. 6(%s) ... so an output like this should be similar to evi formula: 2.5(b08-b04)/(b08+6(b06)-7.5(b02))+1)

kwundram2602 commented 8 months ago

Do you mean like this : ? @PondiB "expr": [ "2.5((b08-b04)/(b08+6(b06)-7.5*(b02))+1)"

PondiB commented 8 months ago

Do you mean like this : ? @PondiB "expr": [ "2.5((b08-b04)/(b08+6(b06)-7.5*(b02))+1)" Yes @kwundram2602 , Perfect.

kwundram2602 commented 8 months ago

Okay , I have commited the change of the evi formula @PondiB