在搜索包含特定坐标的图像时,我面临一个问题。我无法让intersect函数与API一起工作。
我收到一条错误消息:
sentinelsat.sentinel.SentinelAPIError: HTTP status 200 OK: Invalid query string. Check the parameters and format.那么,如何才能使查询与交叉操作??
使用的代码:
from sentinelsat import SentinelAPI, read_geojson, geojson_to_wkt
from datetime import date
from shapely.geometry import box, Polygon
api = SentinelAPI('myusername', 'mypassword','https://scihub.copernicus.eu/dhus')
footprint='footprint:"intersects(POLYGON((0 0,1 1,0 1,0 0)))"'
products = api.query(footprint,
date=('20180901', date(2018, 9, 3)),
area_relation='Intersects',
platformname='Sentinel-2',
cloudcoverpercentage=(0, 10))
print(products)
#this works
#api.download_all(products)知道怎么解决这个问题吗?
发布于 2018-09-06 11:41:19
替换
footprint='footprint:"intersects(POLYGON((0 0,1 1,0 1,0 0)))"'使用
footprint='POLYGON((0 0,1 1,0 1,0 0))'我不知道这些数字是否只是这里的参考,但是这个多边形没有结果。要查看另一个区域的结果,请尝试
footprint='POLYGON((0 0,1 1,0 1,0 0))'
products = api.query(footprint,
date=('20180901', date(2018, 9, 5)),
area_relation='Intersects',
platformname='Sentinel-2',
cloudcoverpercentage=(0, 10))根据正式的哨兵卫星文档,您可以在查询中选择三种不同类型的area_relation。我认为您应该只留下包含多边形的足迹:
Intersects:如果AOI和足迹相交(默认)包含: true,如果AOI在足迹中,IsWithin: true,如果脚印在AOI内
发布于 2018-09-05 18:11:43
如果它与其他OpenGIS实现类似,我认为您需要引用多边形部分,即相交(‘polygon (( 0, 1 ,0,0,0))')。
https://stackoverflow.com/questions/52190107
复制相似问题