-
Notifications
You must be signed in to change notification settings - Fork 251
Description
What is the problem? Please describe.
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.