Skip to content

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

@SlowMo24

Description

@SlowMo24

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions