You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our workflow, we execute an eval_script via a SentinelHubRequest to calculate the NDVI. We then run get_data on that request to retrieve the NDVI data array.
By default the value -999 is used as NoDataValue but this is not clear without trying and we could not find a way to retrieve that value programmatically.
Here's the solution
Return a Numpy Masked Array in the get_data method that can hold that information.
Alternatives
Provide a function to retrieve the NoDataValue.
Additional context
We now set the NoDataValue explicitly in the eval_script and keep a constant in our code that represents that value. If one needed flexibility here, she would probably have to do string-replacement when reading in the JS eval_script because the interaction between python and JS is difficult.
The text was updated successfully, but these errors were encountered:
What is the problem? Please describe.
In our workflow, we execute an
eval_script
via aSentinelHubRequest
to calculate the NDVI. We then runget_data
on that request to retrieve the NDVI data array.By default the value -999 is used as NoDataValue but this is not clear without trying and we could not find a way to retrieve that value programmatically.
Here's the solution
Return a Numpy Masked Array in the
get_data
method that can hold that information.Alternatives
Provide a function to retrieve the NoDataValue.
Additional context
We now set the NoDataValue explicitly in the eval_script and keep a constant in our code that represents that value. If one needed flexibility here, she would probably have to do string-replacement when reading in the JS eval_script because the interaction between python and JS is difficult.
The text was updated successfully, but these errors were encountered: