Skip to main content

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

  • April 26, 2024
  • 2 replies
  • 94 views

Hi,

I have fetched some images from SentinelHub which contains no-data values (e.g. https://services.sentinel-hub.com/ogc/wms/[INSTANCE_ID]?SERVICE=wms&BBOX=509485.0%2C6091690.0%2C509765.0%2C6092090.0&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A32632&WIDTH=56&HEIGHT=80&LAYERS=TRUE-COLOR&REQUEST=GetMap&TIME=2017-02-22T08%3A40%3A30%2F2017-02-22T12%3A40%3A30&MAXCC=5.0&Downsampling=BILINEAR&Upsampling=BILINEAR&Transparent=False&ShowLogo=False), and I want to configure my SentinelHub layer to not return such images.

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?

2 replies

  • Author
  • 3963 posts replied to
  • April 26, 2024

  • 4852 posts replied to
  • April 26, 2024

For different no-data values for different bands - are you sure this is not a result of interpolation? You should observe data on natural resolution (depending on each band).

It is currently not possible to “skip” the scenes with nodata values.
You can however do a pre-fetch call using Statistical API as discussed here:

Hello! Thanks for your quick reply, that information helps, but as the idea es to work without the need of looking at the images, it would be great to get the nodata cover value. Thanks!!