GEE|ee.Filter.maxDifference()用法示例

GEE的示例代码:

// Field site vegetation characteristics from projects in western USA.
var fc = ee.FeatureCollection('BLM/AIM/v1/TerrADat/TerrestrialAIM')
  .filter('ProjectName == "Colorado NWDO Kremmling FO 2016"');

// Display field plots on the map.
Map.setCenter
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
var s2Sr = ee.ImageCollection('COPERNICUS/S2'); var s2Clouds = ee.ImageCollection('COPERNICUS/S2_CLOUD_PROBABILITY'); var START_DATE = ee.Date('2018-01-01'); var END_DATE = ee.Date('2018-12-31'); var MAX_CLOUD_PROBABILITY = 65; function maskClouds(img) { var clouds = ee.Image(img.get('cloud_mask')).select('probability'); var isNotCloud = clouds.lt(MAX_CLOUD_PROBABILITY); return img.updateMask(isNotCloud); } // The masks for the 10m bands sometimes do not exclude bad data at // scene edges, so we apply masks from the 20m and 60m bands as well. // Example asset that needs this operation: // COPERNICUS/S2_CLOUD_PROBABILITY/20190301T000239_20190301T000238_T55GDP function maskEdges(s2_img) { return s2_img.updateMask( s2_img.select('B8A').mask().updateMask(s2_img.select('B9').mask())); } // Filter input collections by desired data range and region. var criteria = ee.Filter.and( ee.Filter.bounds(table), ee.Filter.date(START_DATE, END_DATE)); s2Sr = s2Sr.filter(criteria).map(maskEdges); s2Clouds = s2Clouds.filter(criteria); // Join S2 SR with cloud probability dataset to add cloud mask. var s2SrWithCloudMask = ee.Join.saveFirst('cloud_mask').apply({ primary: s2Sr, secondary: s2Clouds, condition: ee.Filter.equals({leftField: 'system:index', rightField: 'system:index'}) }); var s2CloudMasked = ee.ImageCollection(s2SrWithCloudMask).map(maskClouds).median(); var rgbVis = {min: 0, max: 3000, bands: ['B4', 'B3', 'B2']}; var rgbVis = {min: 0, max: 3000, bands: ['B4', 'B3', 'B2']}; Map.addLayer( s2CloudMasked, rgbVis, 'S2 SR masked at ' + MAX_CLOUD_PROBABILITY + '%', true);将合成图像的全波段下载
最新发布
05-29

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

difizuhvovs

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

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

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

打赏作者

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

抵扣说明:

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

余额充值