在python中使用哨兵进行卫星图像分析

时间:2019-09-09 02:51:41

标签: python workflow sentinel satellite-image

我正在尝试使用Sentinal下载某些地区的地图。我正在使用“ BANDS-S2-L1C”进行身份验证。当我尝试运行一种算法来获取该区域的数据时,它抛出“服务器响应:“未找到层BANDS-S2-L1C””

“有人可以告诉我如何将我的身份证号与程序链接。如何将图层链接到BANDS-S2-L1C”     层='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'}})

我遇到的错误是

DownloadFailedException:在执行任务S2L1CWCSInput期间:无法从以下位置下载: 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 与HTTPError: 400客户端错误:网址请求错误: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 服务器响应:“未找到BANDS-S2-L1C层”

1 个答案:

答案 0 :(得分:0)

您需要先设置和配置SentinelHub帐户。遵循these instructions