Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 2.46 KB

07.reprojection.md

File metadata and controls

55 lines (42 loc) · 2.46 KB

07. Re-projection and Re-sampling Images

Objective

  • A harmonized dataset should has uniform spatial resolution and projection across all bands
  • All shared bands between Landsat and Sentinel2 (blue,green,red,nir,swir1,swir2) are transformed to 30m, WGS84 UTM

General Infomation

  • To resample pixel resolution, bicubic interpolation was chosen over bilinear or nearest-neighbor interpolation because it gives a smoother surface (R. Keys, 1981).
  • It is quite easy to do resampling and reprojection in GEE (GEE documentation).

Core script

var bound = ee.Geometry.Polygon([
  [[35.96060746534647,33.815740435596645], [36.00472443922342,33.815740435596645], [36.00472443922342,33.85366939280121], [35.96060746534647,33.85366939280121], [35.96060746534647,33.815740435596645]]
]);

var bandIn = ['B2','B3','B4','B5','B6','B7'];
var bandOut = ['blue','green','red','nir','swir1','swir2'];

//Example images of S2 and L8
var imgS2SR = ee.Image('COPERNICUS/S2_SR/20181107T082129_20181107T082732_T36SYC').select(bandIn,bandOut).clip(bound);
var imgL8SR = ee.Image('LANDSAT/LC08/C01/T1_SR/LC08_174036_20181107').select(bandIn,bandOut).clip(bound);

//check projection of B4(red) bands
print('S2 CRS:', imgS2SR.select('red').projection().crs());
print('L8 CRS:', imgL8SR.select('red').projection().crs());

// Reproject and rescale L8 image according to S2. Keep the system:time_start in metadata
var L8SR_10m = imgL8SR.resample('bicubic').reproject({
  crs: imgS2SR.select('red').projection().crs(),
  scale: 10
}).set('system:time_start',imgL8SR.date());

Visualization and Checking

Map.centerObject(bound,12)
var visParams = {bands: ['red','green','blue'], min:0, max: 3500};
Map.addLayer(imgL8SR, visParams, 'imgL8SR 30m');
Map.addLayer(imgS2SR, visParams, 'imgS2SR 10m');
Map.addLayer(L8SR_10m, visParams, 'l8SR 10m'); 

  • L8 Original (30m).

30mL8.

  • L8 rescale to 10m (bicubic).

rescale.

References

  1. Cubic convolution interpolation for digital image processing (R. Keys 1981)
  2. Projections in Google Earth Engine (GEE Documentation)