本文整理汇总了Python中sentinelsat.SentinelAPI.get_products_size方法的典型用法代码示例。如果您正苦于以下问题:Python SentinelAPI.get_products_size方法的具体用法?Python SentinelAPI.get_products_size怎么用?Python SentinelAPI.get_products_size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sentinelsat.SentinelAPI
的用法示例。
在下文中一共展示了SentinelAPI.get_products_size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_products_size
# 需要导入模块: from sentinelsat import SentinelAPI [as 别名]
# 或者: from sentinelsat.SentinelAPI import get_products_size [as 别名]
def test_get_products_size(products):
assert SentinelAPI.get_products_size(products) == 90.94
# load a new very small query
api = SentinelAPI(**_api_auth)
with my_vcr.use_cassette('test_get_products_size'):
products = api.query_raw("S1A_WV_OCN__2SSH_20150603T092625_20150603T093332_006207_008194_521E")
assert len(products) > 0
# Rounded to zero
assert SentinelAPI.get_products_size(products) == 0
示例2: test_get_products_size
# 需要导入模块: from sentinelsat import SentinelAPI [as 别名]
# 或者: from sentinelsat.SentinelAPI import get_products_size [as 别名]
def test_get_products_size(api, vcr, products):
assert SentinelAPI.get_products_size(products) == 75.4
# load a new very small query
with vcr.use_cassette('test_get_products_size'):
products = api.query(
raw="S1A_WV_OCN__2SSH_20150603T092625_20150603T093332_006207_008194_521E")
assert len(products) > 0
# Rounded to zero
assert SentinelAPI.get_products_size(products) == 0