Failing in request sentinel1 data with sentinelhub api

I’m trying to acess sentinel1 images using sentinelhub API with jupyter lab notebook.
I’m getting error messages and I don’t understand why I get them.

this is how I try to acess umages with IW (as mentioned in the documentation with specifcying asc or desc):

import os
import datetime
import numpy as np
import matplotlib.pyplot as plt

from sentinelhub import MimeType, CRS, BBox, SentinelHubRequest, SentinelHubDownloadClient, \
    DataCollection, bbox_to_dimensions, DownloadRequest,WmsRequest, WcsRequest, MimeType



#define bbox:
bbox_coords_wgs84 = [-44.763, -6.782, -44.583, -6.896]
bbox = BBox(bbox=bbox_coords_wgs84, crs=CRS.WGS84)

#request:

s1_request = WmsRequest(
    data_collection=DataCollection.SENTINEL1_IW,
    layer='TRUE-COLOR-S1-IW',
    bbox=bbox,
    time=('2020-11-01','2020-12-06'),
    width=512,
    config=config
)

s1_data = s1_request.get_data()
plot_image(s1_data[-1])



>>>DownloadFailedException: Failed to download from: *link*   
with HTTPError:
400 Client Error: Bad Request for url: *long url*  

Server response: "Layer TRUE-COLOR-S1-IW not found"

I also tried specifying:


s1_asc_request = WmsRequest(
    data_collection=DataCollection.SENTINEL1_IW_ASC,
    layer='TRUE-COLOR-S1-IW',
    bbox=bbox,
    time=('2020-11-01','2020-12-06'),
    width=512,
    config=config
)

s1_asc_data = s1_asc_request.get_data()
plot_image(s1_asc_data[-1])

>>>---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-12-2bc6f9148c34> in <module>
      9 
     10 s1_asc_data = s1_asc_request.get_data()
---> 11 plot_image(s1_asc_data[-1])

IndexError: list index out of range

I don’t know why I get thise erros, it seems like I do almost the same as in the tutorial. What is my mistake? why do I get those errors?

thanks :slight_smile:

Hi @reutkeller,

@gmilcinski has answered your question in https://gis.stackexchange.com/questions/381225/request-sentinel1-data-with-sentinelhub-api-doesnt-work

In the future, please post the question here; there is much higher chance of it being answered (we might have missed the stachexchange one).

1 Like