Skip to main content

I try to perform a simple WcsRequest to retrieve Landsat 8 images from Sentinelhub via Python. The Request finds images but the arrays contain only 0 values. I just used code from the official example at Sentinel Hub OGC services — Sentinel Hub 3.9.0 documentation

Here is my request:


‘’’

INSTANCE_ID = ‘your Instance id’ # In case you put instance ID into configuration file you can leave this unchanged


if INSTANCE_ID:

config = SHConfig()

config.instance_id = INSTANCE_ID

else:

config = None


betsiboka_coords_wgs84 = r46.16, -16.15, 46.51, -15.58]

betsiboka_bbox = BBox(bbox=betsiboka_coords_wgs84, crs=CRS.WGS84)!=configuration|689x238]


l8_request = WcsRequest(

data_collection=DataCollection.LANDSAT8,

layer=‘1_TRUE_COLOR’,

bbox=betsiboka_bbox,

time=(‘2017-08-20’,‘2017-09-20’),

resx=‘30m’,

resy=‘30m’,

config=config,

maxcc=0.5,

)


l8_data = l8_request.get_data()

‘’’


Here is my configuration in sentinelhub

Hi,

For now please add an additional parameter time_difference=dt.timedelta(seconds=1). The timedelta should be at least 1 second, but it can be more. The following request should therefore work

l8_request = WcsRequest(
data_collection=DataCollection.LANDSAT8,
layer=‘1_TRUE_COLOR’,
bbox=betsiboka_bbox,
time=(‘2017-08-20’,‘2017-09-20’),
resx=‘30m’,
resy=‘30m’,
config=config,
maxcc=0.5,
time_difference=dt.timedelta(seconds=1)
)

The issue happened due to the recent changes in Sentinel Hub service. It will be fixed in the next release of sentinelhub-py package.


Reply