On Google Earth Engine I'm trying to download some display images using the method image.getThumbURL
. The image shows well in Map.addLayer
, but when I pass it through getThumbURL
I only get a blank image. Here an example of this behavior:
var point = ee.Geometry.Point([11.300422012780208, 44.50570009326473])
var pngArea =
ee.Geometry.Polygon(
[[[10.966712295983333, 44.65340259358304],
[10.966712295983333, 44.24754759759594],
[11.738501846764583, 44.24754759759594],
[11.738501846764583, 44.65340259358304]]], null, false)
var s2coll = ee.ImageCollection("COPERNICUS/S2")
s2coll = s2coll.filterBounds(point)
.filterDate('2018-07-15', '2018-07-30')
print(s2coll)
var img = s2coll.mosaic()
print(img)
var visualization = {
min: 0.0,
max: 2000,
bands: ['B4', 'B3', 'B2'],
}
var outImg = img.visualize(visualization)
Map.addLayer(outImg)
print(outImg.getThumbURL({region: pngArea, format: 'png'}))
https://code.earthengine.google.com/89afe6e672f63d2245ef438288f78f55
What am I doing wrong?