Good morning,
I'm trying to do a supervised classification in Google Earth Engine and I come across the following error:
"User memory limit exceeded".
Does anyone know how to solve this problem?
Thank you
Follow the code:
Map.setCenter(-49.23728942871094,-16.651641716433563, 6);
var OLI = ee.ImageCollection('LANDSAT/LC08/C01/T1_RT_TOA')
.filterBounds(geometry)
//.filterMetadata('CLOUD_COVER', 'Less_Than', 0.3)
//.filterDate('2018-01-01', '2018-12-31');
.median();
var img = OLI;
var amostra = veg.merge(agua).merge(solo);
var bandas = ['B4', 'B5', 'B6'];
var treino = img.select(bandas).sampleRegions ({
collection:amostra,
properties: ['class'],
scale: 30
});
var classificacao = ee.Classifier.minimumDistance('euclidean').train({
features: treino,
classProperty: 'class',
inputProperties: bandas
});
var classificacao = img.select(bandas).classify(classificacao)
Map.addLayer(img, {bands: 'B6,B5,B4'});
Map.addLayer(classificacao, {min: 0, max: 2, palette:['green', 'blue', 'magenta']},'classificação');