Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Make NoData value of downloaded tiff available to python api #555

Open
SlowMo24 opened this issue Jan 24, 2025 · 0 comments
Open

Comments

@SlowMo24
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant