Nayak
Nayak

Reputation: 21

Satellite image analysis using sentinel in python

I am trying to download the map of certain region using Sentinal. I am using "BANDS-S2-L1C" to authenticate. When i try running an algorithm to fetch the data of the region, it is throwing "Server response: "Layer BANDS-S2-L1C not found"

"Can someone tell me how to link my sentinal id with the program. How to link the layer to BANDS-S2-L1C " layer = 'BANDS-S2-L1C'

input_task = S2L1CWCSInput(layer=layer, 
                       resx='20m', resy='20m', 
                       maxcc=.3, 
time_difference=datetime.timedelta(hours=2))

#add_ndvi = S2L1CWCSInput(layer='NDVI')

add_dem = DEMWCSInput(layer='DEM')

add_l2a = S2L2AWCSInput(layer='BANDS-S2-L2A')

add_sen2cor = AddSen2CorClassificationFeature('SCL', layer='BANDS- 
S2-L2A')

save = SaveToDisk('io_example', overwrite_permission=2, 
compress_level=1)

workflow = LinearWorkflow(input_task,  add_l2a, add_sen2cor, 
add_dem, save)

result = workflow.execute({input_task: {'bbox': roi_bbox, 
'time_interval': time_interval},
                       save: {'eopatch_folder': 'eopatch'}})

The error i am getting is

DownloadFailedException: During execution of task S2L1CWCSInput: Failed to download from: https://services.sentinel-hub.com/ogc/wcs/ecc7a293-1882-4cff-8bf8-918a2e74baff?SERVICE=wcs&MAXCC=30.0&ShowLogo=False&Transparent=True&BBOX=44.97%2C27.67%2C45.26%2C28.03&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A4326&TIME=2019-04-01T07%3A18%3A16%2F2019-04-01T11%3A18%3A16&RESX=20m&RESY=20m&COVERAGE=BANDS-S2-L1C&REQUEST=GetCoverage&VERSION=1.1.2 with HTTPError: 400 Client Error: Bad Request for url: https://services.sentinel-hub.com/ogc/wcs/ecc7a293-1882-4cff-8bf8-918a2e74baff?SERVICE=wcs&MAXCC=30.0&ShowLogo=False&Transparent=True&BBOX=44.97%2C27.67%2C45.26%2C28.03&FORMAT=image%2Ftiff%3Bdepth%3D32f&CRS=EPSG%3A4326&TIME=2019-04-01T07%3A18%3A16%2F2019-04-01T11%3A18%3A16&RESX=20m&RESY=20m&COVERAGE=BANDS-S2-L1C&REQUEST=GetCoverage&VERSION=1.1.2 Server response: "Layer BANDS-S2-L1C not found"

Upvotes: 1

Views: 366

Answers (1)

Anze Zupanc
Anze Zupanc

Reputation: 11

You need to first set-up and configure your SentinelHub account. Follow these instructions.

Upvotes: 1

Related Questions