0

My initial goal is to process the global GEDI 10m resolution canopy height data for 2020. I used a loop to cut the original image into 20° x 20° tiles and used convolution kernels to average and aggregate the images to a resolution of 500m * 500m. Taking processing a tile as an example:

var image = ee.Image('users/nlang/ETH_GlobalCanopyHeight_2020_10m_v1').select("b1");
var ResampledResolutionDegrees = 500; 
var projection = image.projection();

then I clipped the image and used convolutional kernels for resampling:

var geometry = ee.Geometry.Rectangle(col, row - 20, col + 20, row);
var CanopyHeight = image.clip(geometry);
      
var kernelSize = 500;
// Define a custom convolution kernel that represents a 50x50 average convolution kernel
var kernel = ee.Kernel.square({
  radius: kernelSize / 2,
  units: 'meters'
});

// Apply convolutional kernels to calculate the average value of the 50x50 area around each pixel
var resampledImage = CanopyHeight.reduceNeighborhood({
  reducer: ee.Reducer.mean(),
  kernel: kernel
});
      
// Reset projection and resolution
resampledImage = resampledImage.reproject({
  crs: projection,
  scale: 500
});

Write the above process as a loop, and I will first display the resampled image on GEE:

Map.addLayer(resampledImage, {min: 0, max: 30, palette: ['blue', 'green', 'red']}, 'Mean Image ' + row + '_' + col);

However, during the download and image display process, After sampling, the southern end of the image underwent deformation, resulting in a missing value:

Pixel missing in the southern tilemap boundary

I checked and it seems that this occurred after the reproject function.

How can I solve this problem?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.