I came to the issue of Out of Memory Error when I tried to do a supervised classification of an image using a shapefile polygons as underlying featureCollection in GEE. It turned out that some of the polygons that I used for sampling the underlying pixels are due to some reason not of "polygon" type but of "GeometryCollection" type (mostly combination of polygon and LineString). I wonder if it is possible to correct these non-polygons and correct their geometry type into "polygon" without producing other side effects?
Please see the attached image of one 'bad' geometry example. This should be a "Polygon" but it has a sliver in it which turned the polygon into "GeometryCollection" consisting of a 'Polygon' + 'LineString'. Unfortunately about one-third of my featureCollection is populated with such geometries! I need to somehow get rid of these artifacts.