I'm trying to export an ALOS DSM raster at its native 30m resolution for a specific region derived from a centroid in GEE. I'm noticing, however, that when I open the raster in ArcGIS there is a clear waffle pattern where the same value was clearly written for two adjacent cells. My guess is that this is because the export is sampling a new 30x30 raster according to the specified region, rather than exporting a clip of the image at its original resolution.


Can anyone help explain what is happening here? And does anyone have a solution for exporting an image for a specified region in GEE that preserves original resolution?

My code here:

var oasis = ee.FeatureCollection(ee.Feature(ee.Geometry.Point([8.979249,34.341562])));

var bounding_box_func = function(feature) {
  var intermediate_buffer = feature.buffer(5000);
  var intermediate_box = intermediate_buffer.bounds();

var oasisBox = oasis.map(bounding_box_func);
var oasisCoords = oasisBox.geometry().coordinates().get(0);
var oasisGeom = ee.Geometry.Polygon(oasisCoords)

var dataset = ee.ImageCollection('JAXA/ALOS/AW3D30/V3_2');
var elevation = dataset.select('DSM');
var medDSM = elevation.reduce(ee.Reducer.median());
var oasisDSM = medDSM.clip(oasisBox);

var DSMVis = {
  min: 200,
  max: 1200,
  palette: ['0000ff', '00ffff', 'ffff00', 'ff0000', 'ffffff']

Map.addLayer(oasisDSM, DSMVis);

var dataLink = medDSM.getDownloadURL( {name: 'El Guettar_ALOSdsm', bands: 'DSM_median', scale: 30, region: oasisGeom} );

When the last line is run without any {scale:} argument I get the following raster of two giant cells as below (pink box is the area of interest):

enter image description here

1 Answer 1


When you care down to the sub-pixel, don't use scale; it only approximates the original image's resolution due to floating point issues, etc. Instead, specify the exact projection that the (closest) image is using:

var first = dataset.filterBounds(oasis).first()
var dataLink = medDSM.getDownloadURL( {
  name: 'El Guettar_ALOSdsm', 
  bands: 'DSM_median', 
  crs: first.projection(), 
  region: oasisGeom
  • Thanks for the help - I tried your edit in my script and ended up with a raster export with only two giant cells. I've edited my post with the image of my result in ArcGIS. Do you have any ideas for this new issue?
    – slidekel
    Jun 23, 2021 at 23:12
  • Maybe you forgot to include the crs? Jun 25, 2021 at 1:04
  • I checked again to make sure I included the crs and I got the same result. Could it have something to do with the missing scale argument?
    – slidekel
    Jun 28, 2021 at 1:36

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.