I have this code that works perfectly for small rasters.
var image = ee.Image("users/parivash89/Cuneo_Reclassify")
.toInt();
Map.addLayer(image);
Map.centerObject(image);
var classes = image.reduceToVectors({
reducer: ee.Reducer.countEvery(),
scale: 10,
maxPixels: 1e10
});
var result = ee.FeatureCollection(classes);
Map.addLayer(result);
// Export the FeatureCollection to a SHP file.
Export.table.toDrive({
collection: result,
folder: 'GEE_Polygonize',
description:'Cuneo',
fileFormat: 'SHP'
});
But gives me the following error while the raster input is large:
Layer 2: Tile error: Geometry has too many edges (3890235 > 2000000)
So I added this line :
// Simplify the feature
var featureSimple = ee.Feature(result).simplify({maxError: 10});
But it did not get simplified and I stil get the error. What should I change in my code? I need the resolution of 10m in my output so I cannot lower the resolution.