Google Earth Engine(GEE)——影像集合的按照行列号搜索并且统计影像数量包括时间、云量和最新影像筛选!
ImageCollection 信息和元数据
与图像一样,有多种方法可以获取有关 ImageCollection
. 集合可以直接打印到控制台,但控制台打印输出限制为 5000 个元素。超过 5000 张图像的集合需要在打印前过滤。打印大集合会相应地变慢。以下示例显示了以编程方式获取有关图像集合的信息的各种方法:此次需要用到以下几个东西大家先看看:=
reduceColumns(reducer, selectors, weightSelectors)
将 reducer 应用于集合的每个元素,使用给定的选择器来确定输入。
返回结果字典,以输出名称为键。
Apply a reducer to each element of a collection, using the given selectors to determine the inputs.
Returns a dictionary of results, keyed with the output names.
Arguments:
this:collection (FeatureCollection):
The collection to aggregate over.
reducer (Reducer):
The reducer to apply.
selectors (List):
A selector for each input of the reducer.
weightSelectors (List, default: null):
A selector for each weighted input of the reducer.
Returns: Dictionary
ee.Reducer.minMax()
返回一个 Reducer,用于计算其输入的最小值和最大值。
Returns a Reducer that computes the minimum and maximum of its inputs.
No arguments.
Returns: Reducer
aggregate_stats(property)
聚合集合中对象的给定属性,计算所选属性的总和、最小值、最大值、平均值、样本标准偏差、样本方差、总标准偏差和总方差。
Aggregates over a given property of the objects in a collection, calculating the sum, min, max, mean, sample standard deviation, sample variance, total standard deviation and total variance of the selected property.
Arguments:
this:collection (FeatureCollection):
The collection to aggregate over.
property (String):
The property to use from each element of the collection.
Returns: Dictionary
代码:
//加载影像并且以行列号的形式搜索影像并进行时间筛选最后打印出影像信息
var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_TOA')
.filter(ee.Filter.eq('WRS_PATH', 44))
.filter(ee.Filter.eq('WRS_ROW', 34))
.filterDate('2014-03-01', '2014-08-01');
print('Collection: ', collection);
// 统计影像的数量
var count = collection.size();
print('Count: ', count);
// 从影像集合中获取影像时间的范围并且进行打印看看效果
var range = collection.reduceColumns(ee.Reducer.minMax(), ["system:time_start"])
print('Date range: ', ee.Date(range.get('min')), ee.Date(range.get('max')))
// 在集合中获取影像的属性值
var sunStats = collection.aggregate_stats('SUN_ELEVATION');
print('Sun elevation statistics: ', sunStats);
// 获取影像的集合并进行云量筛选,获取云量最少的一幅
var image = ee.Image(collection.sort('CLOUD_COVER').first());
print('Least cloudy image: ', image);
// 在时间上进行影像筛选获取获取最新的影像
var recent = collection.sort('system:time_start', false).limit(10);
print('Recent images: ', recent);
相关文章
- Google Earth Engine(GEE)——利用distance进行道路还原的建立缓冲区(还原老的道路照片)
- Google Earth Engine(GEE)——NDVI影像波段的融合成一幅影像:Landsat的NDVI影像举例
- Google Earth Engine(GEE)——数组转影像和降维以及矩阵的相乘变换
- Google Earth Engine(GEE)——累积成本映射案例分析
- Google Earth Engine(GEE)——reduceRegion 和reduceRegions的使用,以及产生结果为什么不同?
- Google Earth Engine(GEE)——月度降水和ndvi植被覆盖度相关性分析(墨西哥为例)
- Google Earth Engine(GEE)——逐日MOD10A1.005积雪覆盖度500m数据下载和均值标准差统计(中国区域为例)
- Google Earth Engine(GEE)——全球高分辨率洪泛区(GFPLAIN250m)数据集
- Google Earth Engine ——MOD08_M3 V6是一个大气全球产品,包含每月1×1度网格的大气参数平均值。包含气溶胶颗粒特性、臭氧总负荷、大气水汽、云的光学和物理特性以及大气稳定性等
- Google Earth Engine ——GCOM-C 进行长期和持续的全球叶面积指数数据集(JAXA/GCOM-C/L3/LAND/LAI/V1)
- 用 Google Authenticator 加强 VPS 及 WordPress 甚至桌面电脑的安全性
- google Guava包的ListenableFuture解析
- Google Play 要出中国版这事 就差个正式发布日期了
- 本博客搜索,因为csdn的搜索功能不好使,所以使用google做个搜索