It is a very simple script, but I cannot figure it out.
The script is to create a list containing the constant images from 0 to 32, and then display them.
var test = ee.List.sequence(0,32).map(function(i){return ee.Image.constant(i); });
print(test);
Map.addLayer(ee.ImageCollection(test),{},'test');
The error is:
test: Tile error: Expected a homogeneous image collection, but an image with an incompatible band was encountered. Mismatched type for band 'constant':
Expected: Type<Float<0.0, 0.0>>.
Actual: Type<Float<1.0, 1.0>>.
Image ID: 1
This band might require an explicit cast.
.int()(or int8(), int16()... ) does not work, which cast the images to integer instead of float? – Nick Carraway Jul 13 '20 at 06:09ee.Image.constant(i).int()and it did not give an error in the example. What are you seeing? (If complex, this might be best posted as a separate question.) – Kevin Reid Jul 13 '20 at 15:21