GEE案例

GEE组合数据

2019-01-08  本文已影响0人  赤豆冰棍

组合数据

主要功能

组合指定时间段(六个月)的LC8数据

代码

// Composite 6 months of Landsat 8.

// Note that the input to simpleComposite is raw data.
var l8 = ee.ImageCollection('LANDSAT/LC08/C01/T1');

// The asFloat parameter gives floating-point TOA output instead of
// the UINT8 outputs of the default simpleComposite().
var composite = ee.Algorithms.Landsat.simpleComposite({
  collection: l8.filterDate('2015-1-1', '2015-7-1'),
  asFloat: true
});

// Pick a spot with lots of clouds.
Map.setCenter(-47.6735, -0.6344, 12);
// Display a composite with a band combination chosen from:
// https://landsat.usgs.gov/how-do-landsat-8-band-combinations-differ-landsat-7-or-landsat-5-satellite-data
Map.addLayer(composite, {bands: ['B6', 'B5', 'B4'], max: [0.3, 0.4, 0.3]});

步骤分析

  1. 创建数据集对象,使用名称来筛选数据
  2. 组合数据,使用影像日期属性来筛选数据集,作为输入数据完成数据组合
  3. 设置地图中心,缩放等级
  4. 添加组合结果图层,展示结果

主要方法

  1. ee.Algorithms.Landsat.simpleComposite()
    Computes a Landsat TOA composite from a collection of raw Landsat scenes. It applies standard TOA calibration and then assigns a cloud score to each pixel using the SimpleLandsatCloudScore algorithm. It selects the lowest possible range of cloud scores at each point and then computes per-band percentile values from the accepted pixels. This algorithm also uses the LandsatPathRowLimit algorithm to select only the least-cloudy scenes in regions where more than maxDepth input scenes are available.
    Arguments:
    collection (ImageCollection):
    The raw Landsat ImageCollection to composite.
    percentile (Integer, default: 50):
    The percentile value to use when compositing each band.
    cloudScoreRange (Integer, default: 10):
    The size of the range of cloud scores to accept per pixel.
    maxDepth (Integer, default: 40):
    An approximate limit on the maximum number of scenes used to compute each pixel.
    asFloat (Boolean, default: false):
    If true, output bands are in the same units as the Landsat.TOA algorithm; if false, TOA values are converted to uint8 by multiplying by 255 (reflective bands) or subtracting 100 (thermal bands) and rounding to the nearest integer.
    Returns: Image

计算landsat的TOA组合结果。对指定的landsat数据执行标准TOA矫正,然后为每一个像素计算一个云指数(cloud score),使用simpleLandsatCloudScore算法。在每一个像素上,选择计算出的最低值,然后计算每一个波段上的百分比。该算法也使用LandsatPathRowLimit算法来选择maxDepth参数控制的最大允许运算深度,即选择cloudscore最少的前多少景影像。
输入参数:数据集(原始landsat数据集),precentile(百分比系数,组合不同波段时,使用的系数,默认是50),云量允许范围(允许一个位置上cloudscore的范围),maxDepth(整数,控制参与组合的影像数量),asFloat(布尔值,控制返回结果是否为浮点型)

上一篇下一篇

猜你喜欢

热点阅读