查询inters中的Python API sentinelsat错误

2024-10-02 22:27:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我在搜索包含特定坐标的图像时遇到了一个问题。我无法让intersect函数与API一起工作。在

我收到这个错误消息:

sentinelsat.sentinel.SentinelAPIError: HTTP status 200 OK: Invalid query string. Check the parameters and format.

那么,如何让查询与交集一起工作??在

使用的代码:

^{pr2}$

你知道怎么解决这个问题吗?


Tags: 函数图像apihttp消息stringstatus错误
2条回答

如果它与其他OpenGIS实现类似,我认为您需要引用polygon部分,即intersects((0 0,1 1,0 1,0 0))')

更换

footprint='footprint:"intersects(POLYGON((0 0,1 1,0 1,0 0)))"'

^{pr2}$

我不知道这些数字是否只是作为参考,但这个多边形没有结果。若要查看其他区域的结果,请尝试

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))

根据官方sentinelsatdocs,您可以在查询中选择三种不同类型的区域关系。我认为您应该只保留包含多边形的迹线:

Intersects: true if the AOI and the footprint intersect (default)
Contains: true if the AOI is inside the footprint
IsWithin: true if the footprint is inside the AOI

相关问题 更多 >