Definition of nodata-value in WCS-Request


Hi Sinergise,

while using your WCS-request via Python to produce NDVI images, I got an image at an orbit boundary, as you can see in the images I attached. However, the nodata-value is 1, which is similar to the maximum possible NDVI.

I was wondering, if it is possible to define the nodata values either in the JS-code of the layer (within the WMS-Configurator) or within the Python-WCS-Request as a parameter.


image%20(1) image


Could you share URL of this request (without instance ID) so that we could “debug” it better.
Generally no data values are 0, e.g. B01=0, B02=0,… So you could catch this in the script e.g.
if (B04==0) return [0,0,0]; (or similar)
I am guessing (but not sure) that you get 1 due to division with 0.


Hi @gmilcinski ,
thank you for the fast answer!
The request is the following:

By the way, if I download a single band, the nodata value seems to be 1 as well.

Kind regards,


I see. This is a consequence of a (not really best) default of OGC standard, which states, that if no TRANSPARENT parameter is provided, no-data pixels are provided as white, therefore resulting in 1.
So to fix this issue, you should set TRANSPARENT=true in the WCS call.
@maleksandrov - it might be good to consider to implement this behaviour in sentinelhub-py by default?

A side note - we are now working on a proprietary API, which will expose satellite data without all these OGC constraints. This will probably solve most of these issues…


is this related to the EO-Learn Library? :slight_smile:


No, this is a parallel development of our core services. We are developing a POST based API, which will act as an interface for advanced users. It will not have any OGC-specific defaults and it will make it possible to query geometry of any size (current API is limited to number of chars in the URL).

eo-learn and sentinelhub-py libraries will be then upgraded to work with this API rather than going through OGC.


Is it possible to define in the JS-code that - if any of the bands contains no-data (i.e. if any pixel contain the value zero) then the data of this date should not be returned?

Filter returned images from SentinelHub using JS-code in layer configuration

This is not possible. The script needs to return some value.