没有合适的资源?快使用搜索试试~ 我知道了~
在谷歌地球引擎上实现遥感数据预处理云量筛选、裁剪、合成等操作,还包括对环境因子的计算均值、求和等。
资源推荐
资源详情
资源评论
var China = ee.FeatureCollection('users/yangjunting6/desert');
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = ee.Number(2).pow(10).int();
var cirrusBitMask = ee.Number(2).pow(11).int();
print(cloudBitMask);
print(cirrusBitMask);
var addNDVI = function(image) {
var qa = image.select('QA60');
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(
qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.addBands(image.normalizedDifference(['B8', 'B4'])
.updateMask(mask)
)};
var collection = ee.ImageCollection('COPERNICUS/S2')
.filterBounds(China)
.filterDate('2014-03-01', '2018-09-30')
.filter(ee.Filter.dayOfYear(90, 180))
.map(addNDVI);
var vizParams = {'bands': ['B4', 'B3', 'B2'], 'max': 4000, 'gamma': 1.6};
//print(collection);
//var newcollection = collection.sort('nd',false).limit(100);
Map.centerObject(China, 8);
var altgr = collection.qualityMosaic('nd').double().clip(China);
var altmean = collection.median().clip(China);
var maskwater = altmean.select('nd').gt(0.1);
var altgrmask = altgr.updateMask(maskwater);
var newcollection = ee.ImageCollection.fromImages([altgrmask,altmean]);
print(newcollection);
var altlast = newcollection.qualityMosaic('nd');
//Map.addLayer(altmean, vizParams);
// Bits 10 and 11 are clouds and cirrus, respectively.
var cloudBitMask = ee.Number(2).pow(10).int();
var cirrusBitMask = ee.Number(2).pow(11).int();
print(cloudBitMask);
print(cirrusBitMask);
var addNDVI = function(image) {
var qa = image.select('QA60');
var mask = qa.bitwiseAnd(cloudBitMask).eq(0).and(
qa.bitwiseAnd(cirrusBitMask).eq(0));
return image.addBands(image.normalizedDifference(['B8', 'B4'])
.updateMask(mask)
)};
var collection = ee.ImageCollection('COPERNICUS/S2')
.filterBounds(China)
.filterDate('2014-03-01', '2018-09-30')
.filter(ee.Filter.dayOfYear(90, 180))
.map(addNDVI);
var vizParams = {'bands': ['B4', 'B3', 'B2'], 'max': 4000, 'gamma': 1.6};
//print(collection);
//var newcollection = collection.sort('nd',false).limit(100);
Map.centerObject(China, 8);
var altgr = collection.qualityMosaic('nd').double().clip(China);
var altmean = collection.median().clip(China);
var maskwater = altmean.select('nd').gt(0.1);
var altgrmask = altgr.updateMask(maskwater);
var newcollection = ee.ImageCollection.fromImages([altgrmask,altmean]);
print(newcollection);
var altlast = newcollection.qualityMosaic('nd');
//Map.addLayer(altmean, vizParams);
//Map.addLayer(altgrmask, vizParams);
Map.addLayer(altlast, vizParams);
print(altlast);
var median = altlast;
var ss = ee.FeatureCollection('users/yangjunting6/somt')
.select('som');
var visParams = {bands: ['B4', 'B3', 'B2'], max: 0.3};
//Map.addLayer(median, visParams, 'median');
//Calculating variables
function radians(img) {
return img.toFloat().multiply(Math.PI).divide(180);
}
var terrain = ee.Algorithms.Terrain(ee.Image('CGIAR/SRTM90_V4')).clip(China);
var slope = radians(terrain.select('slope'));
var aspect = radians(terrain.select('aspect'));
//var sinImage = aspect.divide(180).multiply(Math.PI).sin();
Map.centerObject(China);// Center on the Grand Canyon.
var bands = [ 'B3', 'B4', 'B5', 'B6', 'B7'];
//Map.addLayer(somPoints);
var elevation = ee.Image('CGIAR/SRTM90_V4').clip(China).float();
print(elevation);
var pre = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY')
.filterDate('2017-01-01','2017-12-30')
.filterBounds(China);
var P = pre.filterBounds(China)
.select(['precipitation'], ['pree']);
Map.addLayer(altlast, vizParams);
print(altlast);
var median = altlast;
var ss = ee.FeatureCollection('users/yangjunting6/somt')
.select('som');
var visParams = {bands: ['B4', 'B3', 'B2'], max: 0.3};
//Map.addLayer(median, visParams, 'median');
//Calculating variables
function radians(img) {
return img.toFloat().multiply(Math.PI).divide(180);
}
var terrain = ee.Algorithms.Terrain(ee.Image('CGIAR/SRTM90_V4')).clip(China);
var slope = radians(terrain.select('slope'));
var aspect = radians(terrain.select('aspect'));
//var sinImage = aspect.divide(180).multiply(Math.PI).sin();
Map.centerObject(China);// Center on the Grand Canyon.
var bands = [ 'B3', 'B4', 'B5', 'B6', 'B7'];
//Map.addLayer(somPoints);
var elevation = ee.Image('CGIAR/SRTM90_V4').clip(China).float();
print(elevation);
var pre = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY')
.filterDate('2017-01-01','2017-12-30')
.filterBounds(China);
var P = pre.filterBounds(China)
.select(['precipitation'], ['pree']);
剩余5页未读,继续阅读
资源评论
qq_38760694
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功