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

  • 4
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

此星光明

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值