GEE Landsat 7数据缝隙填充

var aoi = 
    /* color: #d63000 */
    /* shown: false */
    /* displayProperties: [
      {
        "type": "rectangle"
      }
    ] */
    ee.Geometry.Polygon(
        [[[111.79950032193535, 0.6275695843713059],
          [111.79950032193535, 0.5273244443437393],
          [111.91897664029473, 0.5273244443437393],
          [111.91897664029473, 0.6275695843713059]]], null, false),
l7_style = {"opacity":1,"bands":["B7","B5","B2"],"min":0.0265324916690588,"max":0.256043404340744,"gamma":1};

var l7 = ee.ImageCollection("LANDSAT/LE07/C01/T1_TOA")
.filterDate('2004-01-01', '2004-12-31')
.filterBounds(aoi)
.sort('CLOUD_COVER', true)
.first()
print(l7)
var img_fill = l7.focal_mean(1, 'square', 'pixels', 8)
print(img_fill)
var final_image = img_fill.blend(l7)
print(final_image)

Map.addLayer(img_fill.clip(aoi), l7_style, 'Image Fill')
Map.addLayer(l7.clip(aoi), l7_style, 'L7 Original')
Map.addLayer(final_image.clip(aoi), l7_style, 'Final Image')

 

 

其实还是可以看出填充的痕迹,但是比没有好

posted @ 2022-04-17 19:34  icydengyw  阅读(400)  评论(0编辑  收藏  举报