今天突然看到外网的一个博客中展示的一张图片:
本来尝试着用用分辨率较为粗的modis影像查看,但是因为影像分辨率太粗了,所以只能放弃,不错具体加载的图,也在下面:
我们再看看Landsat8影像是否抓拍到这个如来神掌:
这里依旧是十分模糊的一个不到几十个像素的,分辨率有限。
看看最终展示的代码:
//modis
var dataset = ee.ImageCollection('MODIS/006/MOD09A1').filter(ee.Filter.date('2017-09-1', '2017-09-30'));
var trueColor =
dataset.select(['sur_refl_b01', 'sur_refl_b04', 'sur_refl_b03']);
var trueColorVis = {
min: -100.0,
max: 3000.0,
};
Map.addLayer(trueColor, trueColorVis, 'True Color');
//Landsat影像
function maskL8sr(image) {
// Bits 3 and 5 are cloud shadow and cloud, respectively.
var cloudShadowBitMask = (1 << 3);
var cloudsBitMask = (1 << 5);
// Get the pixel QA band.
var qa = image.select('pixel_qa');
// Both flags should be set to zero, indicating clear conditions.
var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
.and(qa.bitwiseAnd(cloudsBitMask).eq(0));
return image.updateMask(mask);
}
var dataset = ee.ImageCollection('LANDSAT/LC08/C01/T2_SR')
.filterDate('2017-09-01', '2018-9-30')
.map(maskL8sr);
var visParams = {
bands: ['B4', 'B3', 'B2'],
min: 0,
max: 3000,
gamma: 1.4,
};
Map.addLayer(dataset.median(), visParams);
//S2影像
var p = ee.Geometry.Point([112.02156688814262,43.70257473891932])
var im = ee.Image("COPERNICUS/S2/20170916T032529_20170916T033358_T49TEJ")
Map.addLayer(im,{min:0,max:3000,bands:"B4,B3,B2"})
Map.centerObject(p,16)