首页 > 其他分享 >Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像

Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像

时间:2022-12-31 11:02:08浏览次数:60  
标签:Engine 同一 ee Sr 36TYM specified var SrFiltered 影像


Sentinel-2 以条带方式拍摄地球图像,这些条带根据​​军事网格参考系统​​​或“MGRS”切片方案划分为瓷砖分布。对于您所在的地区,有两个具有广泛重叠的磁贴(36TYM、37TBG)。您可以在​​此处​​探索网格系统。它们是来自相同条带的数据,但对于 SR 产品,两者对于“相同像素”的值可能略有不同,因为 SR 数据是在分块级别处理的,并且两个不同 UTM 区域(36TYM)的重采样存在差异是 EPSG:32636 而 37TBG 是 EPSG:32637) 并且大气校正等参数的差异会传播到结果。

为避免“重复”数据,您可以通过要保留的 MGRS_TILE 属性值列表过滤集合,例如仅保留 36TYM 和 36TYN 磁贴数据:

函数:

ee.Filter.inList(leftFieldrightValuerightFieldleftValue)

Filter on metadata contained in a list.

Returns the constructed filter.

Arguments:

leftField (String, optional):

A selector for the left operand. Should not be specified if leftValue is specified.

rightValue (List<Object>|Object, optional):

The value of the right operand. Should not be specified if rightField is specified.

rightField (String, optional):

A selector for the right operand. Should not be specified if rightValue is specified.

leftValue (List<Object>|Object, optional):

The value of the left operand. Should not be specified if leftField is specified.

Returns: Filter

var tileList = ['36TYM', '36TYN']
var SrFiltered = Sr.filter(ee.Filter.inList('MGRS_TILE', tileList))

代码:

var geometry=ee.Geometry.Polygon([[35.602367261137886,41.62480227265362],
[36.563670972075386,41.62480227265362],
[36.563670972075386,42.54611702000942],
[35.602367261137886,42.54611702000942],
[35.602367261137886,41.62480227265362]])
Map.centerObject(geometry)
var Sr = ee.ImageCollection('COPERNICUS/S2_SR')
.filterBounds(geometry)
.filter(ee.Filter.lte('CLOUDY_PIXEL_PERCENTAGE', 5))
.filterDate('2021-01-01','2021-12-30')


print('Sr size', Sr.size())
print('Sr sample', Sr.limit(20))
var list=Sr.toList(20)
Map.addLayer(ee.Image(list.get(0)),{'bands':['B4','B3','B2'], 'min':0, 'max':2000})
Map.addLayer(ee.Image(list.get(1)),{'bands':['B4','B3','B2'], 'min':0, 'max':2000})



var tileList = ['36TYM', '36TYN']
var SrFiltered = Sr.filter(ee.Filter.inList('MGRS_TILE', tileList))
print('SrFiltered size', SrFiltered.size())
print('SrFiltered sample', SrFiltered.limit(20))

Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像_sentinel

 

Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像_java_02

Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像_javascript_03

 

Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像_服务器_04

 

Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像_服务器_05

 

Google Earth Engine(GEE)——Sentinel-2影像在同一区域同一时间段有多个不同的ID影像,如何进行筛选其中单景影像_服务器_06

 

 

标签:Engine,同一,ee,Sr,36TYM,specified,var,SrFiltered,影像
From: https://blog.51cto.com/u_15654855/5982037

相关文章