首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >查询相交中的Python哨兵卫星错误

查询相交中的Python哨兵卫星错误
EN

Stack Overflow用户
提问于 2018-09-05 16:54:45
回答 2查看 863关注 0票数 5

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

我收到一条错误消息:

代码语言:javascript
复制
sentinelsat.sentinel.SentinelAPIError: HTTP status 200 OK: Invalid query string. Check the parameters and format.

那么,如何才能使查询与交叉操作??

使用的代码:

代码语言:javascript
复制
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)

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

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-09-06 11:41:19

替换

代码语言:javascript
复制
footprint='footprint:"intersects(POLYGON((0 0,1 1,0 1,0 0)))"'

使用

代码语言:javascript
复制
footprint='POLYGON((0 0,1 1,0 1,0 0))'

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

代码语言:javascript
复制
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内

票数 4
EN

Stack Overflow用户

发布于 2018-09-05 18:11:43

如果它与其他OpenGIS实现类似,我认为您需要引用多边形部分,即相交(‘polygon (( 0, 1 ,0,0,0))')。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52190107

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档