GEE下载L8影像


```javascript
function maskL8sr(image) {
  // The third bit is cloud and the fourth bit is cloudshadow。
  var cloudShadowBitMask = 1 << 4;
  var cloudsBitMask = 1 << 3;

  // Get QA_PIXEL band.
  var qa = image.select('QA_PIXEL');

  // Set the cloud mask to zero
  var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
      .and(qa.bitwiseAnd(cloudsBitMask).eq(0));

  // Update the cloudmask
  return image.updateMask(mask)
      .select("SR_B.*")
      .copyProperties(image, ["system:time_start"]);
}
function L8_ndbi(image){
        return image.addBands(image.normalizedDifference(['SR_B6', 'SR_B5']).rename("NDBI"));
    
  
}
// Map the function over 3 months of data and take the median.
// Load Landsat-8 surface reflectance data.
var table = ee.FeatureCollection("projects/ee-wn1206/assets/dongbei").geometry();
var landsat8 = ee.ImageCollection("LANDSAT/LC08/C02/T1_L2")
			        .filterBounds(table)
              .filterDate('2015-8-01','2015-10-28')
              // Pre-filter to get less cloudy granules.
              .filter(ee.Filter.lte('CLOUD_COVER',5))
              .map(maskL8sr)
              
              .median()
              .clip(table);
//landsat8 = landsat8.uint16();
//print(landsat8);// visualize the datasets

//Map.addLayer(landsat8,rgbVis,'landsat8');
var imgselect = landsat8.select('SR_B2','SR_B3','SR_B4','SR_B5','SR_B6',"SR_B7");

//Export image to google drive and then download

Export.image.toDrive({
  image:imgselect,
  description:'2015',
  scale:500,
  region:table.bounds(),
  folder:"lansdsat",
  crs: "EPSG:4326",
  maxPixels: 1e13
});





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值